Exam 7: Using Methods

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

What accessibility modifier allows access to a method from other classes?

Free
(Multiple Choice)
4.7/5
(33)
Correct Answer:
Verified

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:
Verified

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:
Verified

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 are the components of a C# method declaration?

(Essay)
4.8/5
(33)

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)

What are the components of a C# method?

(Essay)
4.9/5
(34)

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)

Arrays, like all objects, are passed by value.

(True/False)
4.8/5
(38)

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
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)