APSU CSCI 2010 - MIDTERM REVIEW
1. Void method re- False
turns a value
2. Method header Access modifier: public
contains: return type: void
Name of method: writeOutput
Parameter list: ()
3. method body Contains sequences of statements to execute when the method is called, and must
be surrounded by { and }.
4. Method can be True
defined to return
a value?
5. When the return value should be stored in a variable
method is called
6. Keyword "this": refers to the object that is performing the action specified by the method
7. Local variable: Only be accessed within the function that defines it
8. Parameter: A named variable to import arguments into a function
9. A method body True
can contain a
call to another
method
10. If the method be- True
ing called is in the
same class, the
receiving object
1/8
, APSU CSCI 2010 - MIDTERM REVIEW
does not need to
be specified
11. Information hid- A programmer using a method needs to know what the method does, not how it
ing: does it.
12. Comments: specify what a method does
13. Precondition states the conditions that must be true before the method is called.
comment:
14. Postcondition Describes all of the effects produced by a method call.
comment:
15. Encapsulation: Means that the details of a class are hidden if they are not necessary to understand
how objects of the class are used.
16. Class interface: Consists of the headers of the public methods and any public named constants in
the class.
17. Implementation Consists of the instance variables and method definitions in the class.
of a class:
18. Well encapsulat- if changes to the implementation can be made without altering the class interface
ed:
19. Constructor: Special method that is called whenever the new keyword is used.
20. Constructors are True
used initialize
private instance
variables
21. Takes no arguments
2/8
1. Void method re- False
turns a value
2. Method header Access modifier: public
contains: return type: void
Name of method: writeOutput
Parameter list: ()
3. method body Contains sequences of statements to execute when the method is called, and must
be surrounded by { and }.
4. Method can be True
defined to return
a value?
5. When the return value should be stored in a variable
method is called
6. Keyword "this": refers to the object that is performing the action specified by the method
7. Local variable: Only be accessed within the function that defines it
8. Parameter: A named variable to import arguments into a function
9. A method body True
can contain a
call to another
method
10. If the method be- True
ing called is in the
same class, the
receiving object
1/8
, APSU CSCI 2010 - MIDTERM REVIEW
does not need to
be specified
11. Information hid- A programmer using a method needs to know what the method does, not how it
ing: does it.
12. Comments: specify what a method does
13. Precondition states the conditions that must be true before the method is called.
comment:
14. Postcondition Describes all of the effects produced by a method call.
comment:
15. Encapsulation: Means that the details of a class are hidden if they are not necessary to understand
how objects of the class are used.
16. Class interface: Consists of the headers of the public methods and any public named constants in
the class.
17. Implementation Consists of the instance variables and method definitions in the class.
of a class:
18. Well encapsulat- if changes to the implementation can be made without altering the class interface
ed:
19. Constructor: Special method that is called whenever the new keyword is used.
20. Constructors are True
used initialize
private instance
variables
21. Takes no arguments
2/8