Exam 6: Modularizing Your Code with Methods

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

Suppose you're using the debugger to step through a method, and you want to immediately return to the place in the program where the method was called. The Step Return command will accomplish this.

(True/False)
4.9/5
(37)

You can write methods that return any data type.

(True/False)
4.8/5
(33)

It is a standard convention among C# programmers to use ____________ for method names because it differentiates method names from variable and field names.

(Multiple Choice)
4.8/5
(35)

Methods usually belong to a class, so you must write a method's definition inside the class to which it is supposed to belong.

(True/False)
4.7/5
(33)

A method definition has two parts: a header and a body.

(True/False)
4.9/5
(33)

When you pass an argument to a method, the argument's data type must be ____________ with the receiving parameter's data type.

(Multiple Choice)
4.9/5
(36)

A value-returning statement must have a(n) ____________ statement.

(Multiple Choice)
4.8/5
(33)

A mathematical expression such as A * B cannot be passed as an argument to a method containing a value parameter.

(True/False)
4.8/5
(32)

In a general sense, a class is a collection of statements that performs a specific task.

(True/False)
4.8/5
(37)

The memory address that is saved by the system when a method is called and is the location to which the system should return after a method ends is known as the ____________.

(Multiple Choice)
4.8/5
(42)

Every method must have a nonempty parameter list.

(True/False)
4.8/5
(38)

A mathematical expression such as A * B cannot be passed as an argument to a method containing a reference parameter.

(True/False)
4.8/5
(29)

When a ____________ is provided for a parameter, it is possible to call the method without explicitly passing an argument into the parameter.

(Multiple Choice)
4.9/5
(32)

When using the debugger, which command lets you execute a method call without seeing the individual statements within the method?

(Multiple Choice)
4.7/5
(30)

The statements that make up the method body are enclosed inside a set of curly braces.

(True/False)
4.7/5
(46)

When an argument is ____________, only a copy of the argument's value is passed into the parameter variable.

(Multiple Choice)
5.0/5
(35)

The ____________ is a collection of statements that are performed when a method is executed.

(Multiple Choice)
4.9/5
(31)

When a ____________ finishes, it returns a value to the statement that called it.

(Multiple Choice)
4.8/5
(42)

Which of the following is the best type of tool for breaking up input validation into separate steps?

(Multiple Choice)
4.9/5
(35)

If a specific task is performed in several places in a program, a method can be written once to perform that task and then be executed any time it is needed.

(True/False)
4.8/5
(41)
Showing 41 - 60 of 69
close modal

Filters

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