C# Chapter 3 Part 1
All Main( ) method headings must include the ____________ modifier meaning that the method belongs to the type itself rather than to a specific object of a class.
static
Call by ____________ is the default parameter type.
value
The ____________ type is always listed immediately preceding the name of the method.
return
If a method does not return a value, the void keyword is placed inside the parentheses in the method heading.
True or False
False
One way to ensure that you have one entry and one exit from a method is to include a single return statement as the last statement in the method.
True or False
True
public static void Main( )
The access modifier in the heading above is the keyword ____.
public
The primary difference between call by reference using ref versus out is ____.
ref requires the original argument be initialized, out doesn't
The ____ of an identifier is the region of the program in which that identifier is usable.
scope
Calls to ____ methods use the class identifier instead of the object identifier as the method qualifier.
static
The Read( ) method ____.
returns an int
The first line of a method is called the ____ of the method.
heading
Which method returns the largest whole number less than or equal to the specified number?
Floor( )
When you assign a default value to a parameter, it then becomes a(n) ____.
optional parameter
The definition of the method ____.
includes the heading and the body
WriteLine("Final Grade = {0:N2}", CalculateGrade(90, 75, 83));
In the statement above, the values placed inside the parentheses following CalculateGrade are ____.
arguments to the method
When a distinction is made between parameters and arguments, ____.
formal parameters appear in the method heading
double answer = Math.Pow(3, 2);
The result of the call to Math.Pow( ) in the above statement is to store ____ in answer:
9
A method that does not return any value on exit, ____.
must be defined to have a void return type
The ____ parameter type cannot be used unless the original argument is initialized before it is sent to the method.
ref
The return type is physically placed ____.
immediately preceding the name of the method
Avoid writing long methods. Consider refactoring when the method exceeds ____________ lines of code
25
____________ is an overloaded method of the Math class that returns the larger of two
Max( )
Methods that use the static modifier are called _________ methods.
class
The accessibility modifier identifies what type of value is returned when the method is completed.
True or False
False
A namespace is really nothing more than a group of statements placed together under a single
True or False
False
____ is added to hold the screen when the program runs.
Read( )
Unless a using statement is added to include the Math class, calls to members like Round( ), Max( ), and Exp( ), must be called using the class name, because they are all ____.
static methods