Exam 2 (ch 3) Flashcards
Methods may be defined in any order and placed anywhere in the file, in or outside of the class.
True or false
False.
Only inside the class
Methods are the members of a class that perform an action, and through writing methods you describe the behavior of data. True or false.
True
Consol applications require a Main( ) method, unlike Windows applications that do not require a Main( ) method.
True or false
False
The definition of the method includes the entry inside the curly braces, which is sometimes called the body of the method.
True or false
True
A semi colon is placed on the end of a method heading following the parameter list.
True or false
False
There is no semi colon after defining a method. But there is when calling a method
One required entry for a method heading is the return type.
True or false
True
In order to indicate a value is constant and cannot be changed, the keyword constant is added
True or false
False
The keyword is Const
In order to call a static method from another class, the class name must be used with a method name True or false
True
The following are examples of the access modifiers available in C#: public, personal, protected
True or false
False
Personal is not one, others are private, internal and protected internal
The accessibility modifier identifies what type of value is returned when the method is complete.
True or false
False
This is describing the return value
If a method does not return a value, the void keyword is placed inside the parentheses in the method heading
True or false
False
It’s placed right before the method name
A standard convention used by programmers for naming classes is to use an action verb phrase
True or false
False
This is for naming methods
A standard convention used by C# programmers is to use the Pascal case style for class, data member identifiers, and method identifiers.
True or false
False
The entries found inside the parentheses of the method headings are called the access modifiers.
True or false
False
These are the parameters or arguments
The body of a method can include statements that declare other methods
True or false
False
They can only call other methods in the body of a method
The Console class is defined in the System namespace True or false
True
The name of the method, modifiers, return type and the types of its formal parameters make up the signature of the method
True or false
False
The Write( ), WriteLine( ), Read( ), and ReadLine( ) methods are all overloaded True or false
False
Read( ) and ReadLine( ) are not overloaded
The Read( ) method is different from the ReadLine( ) method in that the Read( ) returns an int and the ReadLine( ) returns a string argument True or false
True