Exam 7: Using Methods
Exam 1: A First Program Using C#40 Questions
Exam 2: Using Data39 Questions
Exam 3: Using Gui Objects and the Visual Studio Ide40 Questions
Exam 5: Looping40 Questions
Exam 6: Using Arrays40 Questions
Exam 7: Using Methods39 Questions
Exam 8: Advanced Method Concepts39 Questions
Exam 9: Using Classes and Objects39 Questions
Exam 10: Introduction to Inheritance40 Questions
Exam 11: Exception Handling39 Questions
Exam 12: Using Controls40 Questions
Exam 13: Handling Events41 Questions
Exam 14: Files and Streams40 Questions
Exam 15: Making Decisions40 Questions
Select questions type
What accessibility modifier allows access to a method from other classes?
Free
(Multiple Choice)
4.7/5
(33)
Correct Answer:
A
When a variable or constant is required by multiple methods in a GUI program, where should it be defined?
Free
(Multiple Choice)
4.9/5
(33)
Correct Answer:
C
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.
Free
(True/False)
4.9/5
(35)
Correct Answer:
False
What will a Click() method that responds to button clicks be by default, due to the fact that it is associated with an object that is a Form?
(Multiple Choice)
4.7/5
(35)
What optionally declared method modifier can set limits as to how other methods are able to use the method?
(Multiple Choice)
4.8/5
(40)
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.8/5
(41)
What keyword modifier indicates that a method can be called by referring to the class rather than an object from the class?
(Multiple Choice)
4.7/5
(37)
When a method resides entirely within another method, and can only be called from within the containing method, what is the method known as?
(Multiple Choice)
4.9/5
(33)
For a method that accepts a parameter, what are the components of the parameter definition that must be included in the method declaration? Show an example of a method declaration with a parameter.
(Essay)
4.9/5
(34)
A method can return, at most, one value to a method that calls it.
(True/False)
4.9/5
(39)
What statement is used to cause a value to be sent back to the calling method?
(Multiple Choice)
4.9/5
(41)
When you place a button named okButton on a Form in the IDE and double-click it, what method header is generated automatically? (Note that if you are using Visual Studio 2019, each method name will start with an uppercase letter.)
(Multiple Choice)
4.7/5
(43)
Explain how to write a Main() method that accepts parameters.Why might this format be used?
(Essay)
4.8/5
(32)
What accessibility modifier limits method access to the class that contains the method?
(Multiple Choice)
4.9/5
(35)
The type of an argument in a method call must exactly match the type of the corresponding parameter specified in the method declaration.
(True/False)
4.9/5
(40)
What term is used to describe any device you can use without knowing how it works internally?
(Multiple Choice)
4.8/5
(36)
What is a method that uses another method considered to be?
(Multiple Choice)
4.9/5
(46)
Showing 1 - 20 of 39
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)