CSCI 2010 FINAL EXAM REVIEW
Object - Answers - represent real-world objects or abstract concepts.
Class - Answers - specify the attributes of an object and the actions an object can take
UML Diagram - Answers - Can be used to summarize the properties of a class
Instance Variable - Answers - can be accessed outside of the class using the "."
operator
Method - Answers - defines an action that an object can perform, it can also be called
outside of the class by using the "." operator
Access Modifiers - Answers - Used to specify how a class, method, or instance variable
can be accessed
Public Method or instance variable - Answers - a method that is accessible to another
method of any other class
Private Method or instance variable - Answers - a method that is only accessible to
methods in the same class
Null Constant - Answers - Can be used as a placeholder for a variable that does not
refer to an actual object
Void Method - Answers - Does NOT return a value
Method Header Contains: - Answers - Access Modifier: Public
Return Type: void
Name of method: writeOutput
Parameter list: ()
Method Body - Answers - Sequence of statements that is executed when the method is
called, surrounded by {}
Method can be defined to return a value - Answers - True
When method is called: - Answers - Return value should be stored in a variable
Keyword "this" - Answers - refers to the object that is performing the action specified by
the method
, Local Variable - Answers - A variable that is declared inside of a method body and cant
be accessed outside of it
Two different local variables declared in different methods CANNOT have the same
name - Answers - False
Any variable declared inside of a block is local to that block and CAN be accessed
outside of it - Answers - False
Parameter - Answers - Variables that are defined in a method header and can be used
in method body
Argument - Answers - For each parameter defined in the method header, it must be
provided when the method is called
Accessor method or getter - Answers - used to access the value of a private instance
variable
Mutator method or setter - Answers - used to change the values of private instance
variables
A method CAN contain a can contain a call to another method - Answers - True
If the method being called is in the same class, the receiving object does not need to be
specified - Answers - True
Information Hiding - Answers - programmer using a method needs to know what the
method does, not how it does it
Comments - Answers - Specify what a method does
Precondition comment - Answers - states the conditions that must be true before the
method is called
postcondition comment - Answers - describes all of the effects produced by a method
call
Encapsulation - Answers - means details of a class are hidden if they are not necessary
to understand how objects of the class are used
Class interface - Answers - Consists of headers of public methods and any public
named constants of class
Implementation - Answers - consists of the instance variables and method definitions in
the class
Object - Answers - represent real-world objects or abstract concepts.
Class - Answers - specify the attributes of an object and the actions an object can take
UML Diagram - Answers - Can be used to summarize the properties of a class
Instance Variable - Answers - can be accessed outside of the class using the "."
operator
Method - Answers - defines an action that an object can perform, it can also be called
outside of the class by using the "." operator
Access Modifiers - Answers - Used to specify how a class, method, or instance variable
can be accessed
Public Method or instance variable - Answers - a method that is accessible to another
method of any other class
Private Method or instance variable - Answers - a method that is only accessible to
methods in the same class
Null Constant - Answers - Can be used as a placeholder for a variable that does not
refer to an actual object
Void Method - Answers - Does NOT return a value
Method Header Contains: - Answers - Access Modifier: Public
Return Type: void
Name of method: writeOutput
Parameter list: ()
Method Body - Answers - Sequence of statements that is executed when the method is
called, surrounded by {}
Method can be defined to return a value - Answers - True
When method is called: - Answers - Return value should be stored in a variable
Keyword "this" - Answers - refers to the object that is performing the action specified by
the method
, Local Variable - Answers - A variable that is declared inside of a method body and cant
be accessed outside of it
Two different local variables declared in different methods CANNOT have the same
name - Answers - False
Any variable declared inside of a block is local to that block and CAN be accessed
outside of it - Answers - False
Parameter - Answers - Variables that are defined in a method header and can be used
in method body
Argument - Answers - For each parameter defined in the method header, it must be
provided when the method is called
Accessor method or getter - Answers - used to access the value of a private instance
variable
Mutator method or setter - Answers - used to change the values of private instance
variables
A method CAN contain a can contain a call to another method - Answers - True
If the method being called is in the same class, the receiving object does not need to be
specified - Answers - True
Information Hiding - Answers - programmer using a method needs to know what the
method does, not how it does it
Comments - Answers - Specify what a method does
Precondition comment - Answers - states the conditions that must be true before the
method is called
postcondition comment - Answers - describes all of the effects produced by a method
call
Encapsulation - Answers - means details of a class are hidden if they are not necessary
to understand how objects of the class are used
Class interface - Answers - Consists of headers of public methods and any public
named constants of class
Implementation - Answers - consists of the instance variables and method definitions in
the class