CSCI 2010 APSU Final FINAL Exam Questions WITH CORRECT
Answers GRADED TO PASS!!!
For each parameter defined in the method header, it must be provided when the method is called
Accessor method or getter
used to access the value of a private instance variable
Mutator method or setter
used to change the values of private instance variables
A method CAN contain a can contain a call to another method
True
If the method being called is in the same class, the receiving object does not need to be specified
True
Information Hiding
programmer using a method needs to know what the method does, not how it does it
Comments
Specify what a method does
Precondition comment
states the conditions that must be true before the method is called
postcondition comment
Object
represent real-world objects or abstract concepts.
Class
specify the attributes of an object and the actions an object can take
UML Diagram
Can be used to summarize the properties of a class
Instance Variable
can be accessed outside of the class using the "." operator
Method
defines an action that an object can perform, it can also be called outside of the class by using the "."
operator
Access Modifiers
Answers GRADED TO PASS!!!
For each parameter defined in the method header, it must be provided when the method is called
Accessor method or getter
used to access the value of a private instance variable
Mutator method or setter
used to change the values of private instance variables
A method CAN contain a can contain a call to another method
True
If the method being called is in the same class, the receiving object does not need to be specified
True
Information Hiding
programmer using a method needs to know what the method does, not how it does it
Comments
Specify what a method does
Precondition comment
states the conditions that must be true before the method is called
postcondition comment
Object
represent real-world objects or abstract concepts.
Class
specify the attributes of an object and the actions an object can take
UML Diagram
Can be used to summarize the properties of a class
Instance Variable
can be accessed outside of the class using the "." operator
Method
defines an action that an object can perform, it can also be called outside of the class by using the "."
operator
Access Modifiers