Intro To Programming Final #2

8 September 2022
4.7 (114 reviews)
24 test answers

Unlock all answers in this set

Unlock answers (20)
question
You can think of the ____ in a method declaration as a funnel into the method.
answer
parentheses
question
A method could be called using any numeric value as an argument, whether it is a variable, a named constant, or a literal constant.
answer
true
question
Each time a method executes, any parameter variables listed in the method header are ____.
answer
redeclared
question
A method's declared return type must match the type of value used in the return statement.
answer
true
question
In implementation hiding, the calling method needs to understand only the interface to the method that is called and it need not know how the method works internally.
answer
true
question
Programmers use the term ____ to describe any extra time and resources required by an operation.
answer
overhead
question
____ is the ability of a method to act appropriately depending on the context.
answer
polymorphism
question
The method name and parameter list constitute the ____.
answer
signature
question
A method can return nothing, in which case the method is a ____ method.
answer
void
question
When a data item is known to all of a program's modules, it is a ____data item.
answer
global
question
Variables and constants are ____ within, or local to, only the method in which they are declared.
answer
in scope
question
Arrays, unlike simple built-in types, are passed by ____.
answer
reference
question
When a copy of a variable is sent to a method, it is passed by ____.
answer
value
question
When methods must share data, you can pass the data into and return the data out of methods.
answer
true
question
Methods with identical names that have identical parameter lists but different return types are ambiguous.
answer
true
question
A calling method sends a(n) ____ to a called method.
answer
argument
question
The variables in the method declaration that accept the values from the actual parameters are ____ parameters.
answer
formal
question
A method's return type is part of its signature.
answer
false
question
A called method accepts the value of an argument passed to it as its ____.
answer
parameter
question
All modern programming languages contain many methods that are predefined.
answer
true
question
A method's name and parameter list constitute the method's ____.
answer
signature
question
The last statement in a method is a(n) ____.
answer
return statement
question
Every time you call a method, the address to which the program should return at the completion of the method is stored in a memory location called the ____.
answer
stack
question
These items must be included within the method's declaration parentheses:
answer
return type, name, parentheses (), and braces {}