ACTUAL Exam Questions and CORRECT
Answers
Object - CORRECT ANSWER -an instance of a class that are created to use the attributes
and methods of a class
Class - CORRECT ANSWER -Blueprints of an object
UML class diagram - CORRECT ANSWER -describes the structure of a class by
displaying the class name (first row), variables (second row), and methods (third row).
Instance variable - CORRECT ANSWER -a variable defined in a class for which every
object of the class has its own value
Method - CORRECT ANSWER -A block of code that, when called, performs specific
actions mentioned in it
The null constant - CORRECT ANSWER -indicates the null value / has no data type
Void Method - CORRECT ANSWER -Method that does not return a value
Method header - CORRECT ANSWER -Public / void/ writeOutput / ()
Method Body - CORRECT ANSWER -a sequence of statements to execute when the
method is called, and must be surrounded by { and }
this - CORRECT ANSWER -refers to the object that is performing the action specified by
the method
, Local Variable - CORRECT ANSWER -temporary variable that exist only in a particular
function o block of statements
Parameter - CORRECT ANSWER -Information that is passed to a method / act as
variables inside the method
Accessor method / Getter - CORRECT ANSWER -Allows access to private variables not
inside the class
Mutator method / Setter - CORRECT ANSWER -Allows changing of a private variable
not inside the class
Information hiding - CORRECT ANSWER -a programmer using a method needs to
knowwhat the method does, not how it does it
Precondition comment - CORRECT ANSWER -states the conditions that must be true
before the method is called.
Postcondition comment - CORRECT ANSWER -describes all of the effects produced by a
method call
Encapsulation - CORRECT ANSWER -the details of a class are hidden if they are
notnecessary to understand how objects of the class are used.
Class interface - CORRECT ANSWER -consists of the headers of the public methods and
anypublic named constants in the class
Implementation - CORRECT ANSWER -consists of the instance variables and method
definitions in the class.