Exam 6: Modularizing Your Code With Methods

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

Default arguments must be literals or constants.

Free
(True/False)
4.9/5
(35)
Correct Answer:
Verified

True

You can use a(n) ____________ to test a condition, and then return either to indicate whether the condition exists..

Free
(Multiple Choice)
4.8/5
(39)
Correct Answer:
Verified

B

You can pass only string arguments into string parameters.

Free
(True/False)
4.8/5
(48)
Correct Answer:
Verified

True

When you want a method to be able to change the value of a variable that is passed to it as an argument, the variable must be ____________.

(Multiple Choice)
4.8/5
(38)

When a method contains multiple parameter declarations, the declarations are often referred to as a(n) ____________.

(Multiple Choice)
4.8/5
(48)

When you call a ____________, it simply executes the statements it contains and then terminates.

(Multiple Choice)
4.8/5
(33)

A parameter variable, often simply called a(n)____________, is a special variable that receives an argument when a method is called.

(Multiple Choice)
4.8/5
(41)

Which one of the following statements correctly calls a method named ShowName?

(Multiple Choice)
4.8/5
(38)

If you are writing a method and you want it to receive arguments when it is called, you must equip the method with one or more access modifiers.

(True/False)
4.7/5
(43)

A parameter variable can be accessed by any statement outside the method in which the parameter variable is declared.

(True/False)
4.8/5
(34)

In general terms, a program that is broken into smaller units of code, such as methods, is known as a____________.

(Multiple Choice)
5.0/5
(36)

Modularization tends to simplify code.

(True/False)
4.9/5
(34)

Default arguments were introduced in Visual C# 2010, so you cannot use them in older versions of C#.

(True/False)
4.9/5
(39)

When a method is declared with the private access modifier, it can be called only by code inside the same class as the method.

(True/False)
4.9/5
(45)

The contents of variables and the values of expressions can be passed as arguments to a method.

(True/False)
4.9/5
(25)

You can pass int arguments into int parameters, but you cannot pass double or decimal arguments into int parameters.

(True/False)
4.7/5
(32)

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.7/5
(35)

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

(True/False)
4.7/5
(35)

When the keyword void appears in the method header, it means that the method will return a value.

(True/False)
4.9/5
(39)

In the header, the method name is always followed by a set of parentheses.

(True/False)
4.8/5
(33)
Showing 1 - 20 of 61
close modal

Filters

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