PHƯƠNG THỨC CÓ TÊN Tiếng anh là gì - trong Tiếng anh Dịch

method called
gọi phương thức
method named
tên phương thức

Ví dụ về việc sử dụng Phương thức có tên trong Tiếng việt và bản dịch của chúng sang Tiếng anh

{-}
  • Colloquial category close
  • Ecclesiastic category close
  • Computer category close
Dùng giả mã trong Mục 14.6, hãy viết phương thức có tên merge.
Using the pseudocode in Section 13.4, write the method called merge.
Hãy viết một phương thức có tên myexp để tính tổng của n số hạng đầu tiên trong dãy này.
Write a method called myexp that adds up the first n terms of this series.
Ảnh mặt nạ được nén theo một phương thức có tên JB2( tương tự như JBIG2).
The mask image is compressed using a method called JB2(similar to JBIG2).
Trong các ngôn ngữ khác,điều này thường được thực hiện với một phương thức có tên fold.
In other languages, this is commonly done with a method named fold.
Hãy viết một phương thức có tên check nhận vào một tham số, x, để in ra giá trị của x, Math.
Write a method called check that takes a single parameter, x, and that prints the values of x, Math.
Trình biên dịch sẽ nói kiểu như,“ Không thể tìm thấy phương thức có tên pow trong lớp NewLine.”.
The compiler will say something like,“Can't find a method named pow in class NewLine.".
Viết một phương thức có tên invert để nghịch đảo số bằng cách tráo đổi tử số và mẫu số.
Write an instance method called invert that inverts the number by swapping the numerator and denominator.
Chẳng hạn, nếu bạn định nghĩa một phương thức có tên add cho lớp Time, bạn thể dùng toán tử+ với các đối tượng Time.
For example, if you dene a method named__add__ for the Time class, you can use the+ operator on Time objects.
Viết một phương thức có tên printRational để nhận vào đối số là một đối tượng Rational rồi in nó ra theo định dạng hợp lý.
Write a method called printRational that takes a Rational object as an argument and prints it in some reasonable format.
Tiếp theo, hãy viết một phương thức có tên colorBug để nhận tham số là một con bọ, đọc vào tọa độ của nó, rồi đặt màu.
Then write a method named colorBug that takes a Bug as a parameter, reads its location, and sets the color.
Viết một phương thức có tên add để nhận hai đối số là hai Rational rồi trả lại một đối tượng Rational mới.
Write a method called add that takes two Rational numbers as arguments and returns a new Rational object.
Hãy viết một phương thức có tên yikes để nhận tham số là một double rồi dùng multadd để tính.
Write a method called yikes that takes a double as a parameter and that uses multadd to calculate xe- x+.
Hãy viết một phương thức có tên max nhận tham số là một mảng rồi dùng maxInRange để tìm và trả lại giá trị lớn nhất.
Write a method called max that takes an array and uses maxInRange to find and return the largest element.
Hãy viết một phương thức có tên gauss nhận vào các đối số x và n rồi trả lại tổng của n số hạng đầu tiên trong chuỗi này.
Write a method named gauss that takes x and n as arguments and that returns the sum of the first n terms of the series.
Viết một phương thức có tên toDouble để chuyển đổi phân số thành một số double( số dấu phẩy động) rồi trả lại kết quả.
Write a method called toDouble that converts the rational number to a double(floating-point number) and returns the result.
Hãy viết một phương thức có tên canSpell nhận vào hai chuỗi rồi trả lại true nếu tập hợp các miếng vuông xếp được thành từ nghĩa.
Write a method called canSpell that takes two Strings and returns true if the set of tiles can be used to spell the word.
Bài tập 11 Viết một phương thức có tên letterHist nhận một chuỗi làm tham số rồi trả lại histogram của các chữ cái trong chuỗi.
Exercise 12.11 Write a method called letterHist that takes a String as a parameter and that returns a histogram of the letters in the String.
Hãy viết một phương thức có tên suitHist nhận tham số là một mảng gồm những Card rồi trả lại một histogram các chất trong nhóm.
Exercise 13.4 Write a method called suitHist that takes an array of Cards as a parameter and that returns a histogram of the suits in the hand.
Viết một phương thức có tên middle nhận vào một String rồi trả lại một chuỗi con chứa mọi thứ trừ hai chữ cái đầu và cuối.
Write a method named middle that takes a String and returns a substring that contains everything except the first and last characters.
Viết một phương thức có tên first nhận vào một String rồi trả lại chữ cái đầu tiên, và một phương thức last để trả lại chữ cái cuối cùng.
Write a method named first that takes a String and returns the first letter, and one named last that returns the last letter.
Hãy viết một phương thức có tên makeBugs để nhận vào một ActorWorld và một số nguyên n rồi tạo nên n con bọ màu sắc tùy thuộc theo tọa độ của chúng.
Write a method named makeBugs that takes an ActorWorld and an integer n and creates n bugs colored according to their location.
Bài tập 2 Viết một phương thức có tên randomDouble nhận vào hai số phẩy động, low và high, rồi trả lại một số phẩy động ngẫu nhiên, x, sao cho low ≤ x< high.
Exercise 12.1 Write a method called randomDouble that takes two doubles, low and high, and that returns a random double x so that low≤ x< high.
Viết một phương thức có tên selectionSort nhận vào một mảng các số nguyên và trong đó dùng indexOfMaxInRange cùng swapElement để xếp mảng từ nhỏ đến lớn.
Write a method called sortArray that takes an array of integers and that uses indexOfMaxInRange and swapElement to sort the array from largest to smallest.
Hãy viết một phương thức có tên gcd để nhận tham số là hai số nguyên rồi dùng Thuật toán Euclid để tính và trả lại ước số chung lớn nhất của hai số.
Write a method called gcd that takes two integer parameters and that uses Euclid's algorithm to compute and return the greatest common divisor of the two numbers.
Bài tập 1 Hãy viết một phương thức có tên isDivisible để nhận vào hai số nguyên, n và m rồi trả lại true nếu n chia hết cho m và trả lại false trong trường hợp còn lại.
Exercise 6.1 Write a class method named isDivisible that takes two integers, n and m and that returns true if n is divisible by m and false otherwise.
Hãy viết một phương thức có tên radial để vẽ một loạt các đường thẳng đồng quy như ở hình( phải), nhưng phải đủ sát nhau để tạo nên một dạng mẫu Moiré.
Write a method named radial that draws a radial set of line segments as shown in Figure B.5(right), but they should be close enough together to create a Moiré pattern.
Một mẹo là viết một phương thức có tên findBisect trong đó nhận vào tham số là hai chỉ số, low và high, quy định đoạn trong mảng cần được tìm kiếm( bao gồm cả low và high).
The trick is to write a method called findBisect that takes two indices as parameters, low and high, indicating the segment of the array that should be searched(including both low and high).
Bài tập 1 Hãy viết một phương thức có tên cloneArray để nhận vào tham số là một mảng các số nguyên, tạo ra một mảng mới cùng kích thước, sao chép các phần tử từ mảng đầu sang mảng mới tạo, rồi trả lại một tham chiếu đến mảng mới.
As an exercise, write a method called cloneArray that takes an array of integers as a parameter, creates a new array that is the same size, copies the elements from the first array into the new one, and then returns a reference to the new array.
Ví dụ: nếu một phương thức có tên GetUser được đổi tên thành GetEmployee như một phần của một số cập nhật mã, mọi tham chiếu đến GetUser trong suốt phần còn lại của ứng dụng sẽ gây ra lỗi trong quá trình biên dịch, giúp dễ dàng xác định và sửa lỗi.
For example, if a method named GetUser is renamed to GetEmployee as part of some code updates, any reference to GetUser throughout the rest of the application will cause an error during compilation, making it easy to identify and fix.
Kết quả: 29, Thời gian: 0.0195

Từng chữ dịch

Truy vấn từ điển hàng đầu

Tiếng việt - Tiếng anh