Questions and CORRECT Answers
A(n) ________________ is a step-by-step process for solving a problem. - CORRECT
ANSWER - algorithm
A(n) ___________________ object is one that is made up, at least in part, of other objects. -
CORRECT ANSWER - aggregate
A ___________ is a way of visually representing how classes and objects interact. - CORRECT
ANSWER - UML diagram
A _____________can be thought of as a blueprint for a set of objects. - CORRECT
ANSWER - class
Which of the following method headers is most likely a header for a mutator method? -
CORRECT ANSWER - public void setAge(int newAge)
_________ are methods that change the value of an instance variable, and are often referred to as
"setters." - CORRECT ANSWER - Mutators
If a service is so complex that it cannot be reasonably be implemented using one method, it is
often helpful to decompose it to make use of ________________ support methods. - CORRECT
ANSWER - Private
All methods (with the exception of constructors) must specify a return type. What is the return
type for a method that does not return any values? - CORRECT ANSWER - void
A variable can always be referenced anywhere in a program. - CORRECT ANSWER -
False
, The ________________ reference always refers to the currently executing object. - CORRECT
ANSWER - this
A ______reference is a reference that is not pointing to any object. - CORRECT
ANSWER - null
The versions of an overloaded method are distinguished by ___________________________. -
CORRECT ANSWER - the number, type and order of their parameters
___________________ are two methods in the same class that have the same identifier, but a
different number, type or order of parameters. - CORRECT ANSWER - Overloaded
methods
A _______________ variable is shared among all instances of a class. - CORRECT
ANSWER - static
A final variable is a __________ - CORRECT ANSWER - constant
a _____________________ is one that is accessible from outside the object and a private
variable is one that cannot be accessed outside of the object. - CORRECT ANSWER -
public variable
Methods that can be called directly through the class name and do not need to have an object
instantiated are called _________________. - CORRECT ANSWER - static
Methods declared as _______ cannot be overridden. - CORRECT ANSWER - final
__________ occurs when a child class defines a method with the same signature as a method in
the parent class. - CORRECT ANSWER - Overriding