Exam 6: Using Methods

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

The three parts of a method are the method's header, the method's body, and the method's return statement.

(True/False)
4.7/5
(39)

Arrays are passed to a method by ____.

(Multiple Choice)
4.9/5
(37)

Overloading a method is an example of ____________________, the ability of a method to act appropriately according to the context.

(Short Answer)
4.8/5
(39)

When a method receives an argument, it is stored as a(n) ____________________ in the method header.

(Short Answer)
4.8/5
(43)

A method can return nothing, which makes it a(n) ____ method.

(Multiple Choice)
5.0/5
(33)

When you overload a method, you run the risk of creating ____ methods-a situation in which the compiler cannot determine which method to use.

(Multiple Choice)
4.8/5
(35)

A method cannot be used more than once within a program or in other programs.

(True/False)
4.9/5
(43)

In most programming languages, you are allowed to include multiple ____ statements in a method.

(Multiple Choice)
4.9/5
(37)

What is one item that must be included in a method's header if it can receive a parameter?

(Multiple Choice)
4.9/5
(37)

When a method returns a value, you usually want to use it in the ____ method.

(Multiple Choice)
4.8/5
(33)

The feature of modular programs that allows individual methods to be used in a variety of applications is known as ____________________.

(Short Answer)
4.8/5
(32)

You should avoid overloading a method with the same argument data types because this will create an ambiguous method that will not compile.

(True/False)
4.8/5
(40)

One advantage of modularization is that it simplifies the ____.

(Multiple Choice)
4.9/5
(41)

____ variables and constants are those that are known to an entire class.

(Multiple Choice)
4.9/5
(33)

When a method's local variables go ____________________, they cease to exist, or die.

(Short Answer)
4.7/5
(35)

Most programming languages contain a variety of mathematical methods, such as those that compute a square root or the absolute value of a number.

(True/False)
4.8/5
(39)

When you ____ a method, you write multiple methods with a shared name but different parameter lists.

(Multiple Choice)
4.9/5
(35)

Programmers refer to hidden implementation details as existing in a ____.

(Multiple Choice)
4.8/5
(33)

The more the statements contribute to the same job, the less the functional cohesion of the method.

(True/False)
5.0/5
(46)

When a method needs to use another method, it ____________________ that other method.

(Short Answer)
4.9/5
(33)
Showing 21 - 40 of 50
close modal

Filters

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