1.
At most, a class can contain ____________ method(s).
A. 
B. 
C. 
D. 
2.
What is the most important reason for creating methods within a program?
A. 
Methods are easily reusable.
B. 
Because all methods must be stored in the same class, they are easy to find
C. 
The Main() method becomes more detailed.
D. 
3.
In C#, a method must include all of the following except a ___________ .
A. 
B. 
C. 
D. 
4.
A method declaration might contain ____________ .
A. 
B. 
C. 
D. 
Parameters separated by dots
5.
A method declaration must contain _______________ .
A. 
B. 
C. 
D. 
A return type (even void)
a return type (even void)
6.
If you want to create a method that other methods can access without limitations, you declare the method to be _____________.
A. 
B. 
C. 
D. 
7.
If you use the keyword modifier static in a method header, you indicate that the method ______________.
A. 
Can be called without referring to an object or class
B. 
C. 
D. 
Cannot require parameters
8.
A method’s type is also its ____________ .
A. 
B. 
C. 
D. 
9.
When you use a method, you do not need to know how it operates internally. This feature is called _____________
A. 
B. 
C. 
D. 
10.
When you write the method declaration for a method that can receive a parameter, you need to include all of the following items except __________ .
A. 
B. 
The type of the parameter
C. 
A local name for the parameter
D. 
An initial value for the parameter
11.
Suppose you have declared a variable as
int myAge = 21;.
Which of the following is a legal call to a method with the declaration
static public void AMethod(int num)
A. 
B. 
C. 
D. 
12.
Suppose you have declared a method
static public void CalculatePay(double rate)
When a method calls the CalculatePay() method, the calling method ______________ .
A. 
Must contain a declared double named rate
B. 
Might contain a declared double named rate
C. 
Cannot contain a declared double named rate
D. 
Cannot contain any declared double variables
13.
In the method call
PrintTheData(double salary);
salary is the ______________ parameter.
A. 
B. 
C. 
D. 
14.
A program contains the method call PrintTheData(salary);In the method declaration, the name of the formal parameter must be __________ .
A. 
B. 
Any legal identifier other than salary
C. 
D. 
15.
What is a correct declaration for a method that receives two double arguments and calculates the difference between them?
A. 
Static public void CalcDifference(double price1, price2)
B. 
Static public void CalcDifference(double price1, double price2)
C. 
Both of these are correct.
D. 
None of these are correct.
16.
What is a correct declaration for a method that receives two double arguments and sums them?
A. 
Static public void CalcSum(double firstValue, double secondValue)
B. 
Static public void CalcSum(double price1, double price2)
C. 
Both of these are correct.
D. 
None of these are correct.
17.
A method is declared as
public static double CalcPay(int hoursWorked)
Suppose you write a Main() method in the same class that contains the declarations
int hours = 35; double pay;
Which of the following represents a correct way to call the CalcPay() method from the Main() method?
A. 
B. 
C. 
Pay = CalcPay(hoursWorked);
D. 
18.
Suppose the value of boolean method: isRateOK() = true and the value of boolean method isQuantityOK() = false.
When you evaluate the expression
(isRateOK() || isQuantityOK()), which of the following is true?
A. 
Only the method isRateOK() executes.
B. 
Only the method isQuantityOK() executes.
C. 
D. 
19.
Suppose the value of boolean method isRateOK() = true and the value of boolean method isQuantityOK() = false.
When you evaluate the expression
(isRateOK() && isQuantityOK())
which of the following is true?
A. 
Only the method isRateOK() executes.
B. 
Only the method isQuantityOK() executes.
C. 
D. 
20.
When an array is passed to a method, the method has access to the array’s memory address. This means an array is passed by ___________
A. 
B. 
C. 
D. 
21.
A structure that allows repeated execution of a block of statements is a(n) __________________ .
A. 
B. 
C. 
D. 
22.
The body of a while loop can consist of ______________
A. 
B. 
A block of statements within curly braces
C. 
D. 
Neither a nor b
neither a nor b
neither a nor b
neither a nor b
23.
A loop that never ends is called a(n) ___________ loop.
A. 
B. 
C. 
D. 
24.
Which of the following is not required of a loop control variable in a correctly working loop?
A. 
It is initialized before the loop starts.
B. 
C. 
It is reset to its initial value before the loop ends.
D. 
It is altered in the loop body.
25.
while loop with an empty body contains no ___________
A. 
B. 
C. 
D. 
Test within the parentheses of the while statement