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
(80)
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
(74)
Correct Answer:
Verified

B

You can pass only string arguments into string parameters.

Free
(True/False)
4.8/5
(94)
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
(72)

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

(Multiple Choice)
4.8/5
(88)

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

(Multiple Choice)
4.8/5
(81)

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
(79)

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

(Multiple Choice)
4.8/5
(86)

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

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

(True/False)
4.8/5
(76)

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
(85)

Modularization tends to simplify code.

(True/False)
4.9/5
(68)

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

(True/False)
4.9/5
(81)

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
(82)

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

(True/False)
4.9/5
(66)

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

(True/False)
4.7/5
(77)

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
(62)

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

(True/False)
4.7/5
(81)

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

(True/False)
4.9/5
(76)

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

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

Filters

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