Exam 7: Using Methods
Exam 1: A First Program Using C42 Questions
Exam 2: Using Data42 Questions
Exam 3: Using Gui Objects and the Visual Studio Ide42 Questions
Exam 4: Making Decisions42 Questions
Exam 5: Looping42 Questions
Exam 6: Using Arrays42 Questions
Exam 7: Using Methods42 Questions
Exam 8: Advanced Method Concepts42 Questions
Exam 9: Using Classes and Objects42 Questions
Exam 10: Introduction to Inheritance42 Questions
Exam 11: Exception Handling42 Questions
Exam 12: Using Controls42 Questions
Exam 13: Handling Events41 Questions
Exam 14: Files and Streams42 Questions
Select questions type
Methods can ____, or call, other methods; that is, a program uses a method's name and the method performs a job for the class.
Free
(Multiple Choice)
4.9/5
(41)
Correct Answer:
D
Because the ReadLine() method call can be assigned to a string, its return type is ____ .
Free
(Multiple Choice)
4.8/5
(33)
Correct Answer:
D
A parameter within a method header is called a(n) ____ parameter.
Free
(Multiple Choice)
4.9/5
(37)
Correct Answer:
A
Describe how nested method calls work. For example, if you have three nested method calls, which method executes first and how are return values propagated? Is there a limit to how many method calls can be nested?
(Essay)
4.8/5
(44)
A method ____ is a variable that holds data passed to the method when it is called; it receives an argument's value when the method executes.
(Multiple Choice)
4.7/5
(42)
A ____ statement causes a value to be sent back to the calling method.
(Multiple Choice)
4.8/5
(31)
You indicate that a method parameter is an array by placing ____ after the data type in the method's parameter list.
(Multiple Choice)
4.9/5
(37)
To more easily incorporate methods into a program, it is common practice to store methods in their own classes and files. Then you can add them into any application that uses them. The resulting compound program is called a(n) ____.
(Multiple Choice)
4.8/5
(37)
Match each item with a statement below:
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(42)
If you use the keyword modifier ____, you indicate that a method can be called by referring to the class rather than an object from the class.
(Multiple Choice)
4.8/5
(38)
A declaration for a method that receives two or more arguments must list the type for each parameter separately only if the parameters have different types.
(True/False)
4.8/5
(33)
A method ____________________ is a block of statements that carry out the method's work.
(Short Answer)
4.8/5
(43)
If you create a Click() method that responds to button clicks, it will be ____ by default because it is associated with an object that is a Form .
(Multiple Choice)
4.9/5
(38)
The ____ accessibility modifier limits method access to the class that contains the method.
(Multiple Choice)
4.9/5
(35)
The number of arguments does not need to match the number in the parameter list when you use ____.
(Multiple Choice)
4.9/5
(28)
A formal parameter that receives a copy of the value passed to it is also an example of a(n) ____ parameter.
(Multiple Choice)
4.9/5
(33)
The keyword static is used with Main() methods in console applications because the method is associated with its containing class and not with an object. Why are Form methods, such as a Click() method that responds to button clicks, nonstatic?
(Essay)
4.7/5
(32)
If a method does not return a value, its return type is ____________________.
(Short Answer)
4.8/5
(45)
Showing 1 - 20 of 42
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)