Java Basics
Name _____________________________
OOP Terminology Questions
Choose the most appropriate answer from this list to identify each of the program elements below.
- Class name
- Instance method name.
- Static method name.
- Constructor.
- Local variable name.
- Instance variable name.
- Static variable name.
- Formal parameter name.
- Actual argument.
- None of the above.
Questions
All of these questions are about the Hammurabi source code. See Programming: Hammurabi Game I. Write the letter of the most appropriate choice from the above list. Some choices may occur more than once, and some may never be used.
- ____
JOptionPane
(Hammurabi line 23) - ____
showMessageDialog
(Hammurabi line 23) - ____
null
(Hammurabi line 23) - ____
food
(Hammurabi line 26) - ____
MIN_GRAIN_TO_SURVIVE
(Kingdom line 11) - ____
myYear
(Kingdom line 21) - ____
getGrain
(Kingdom line 25) - ____
simulateOneYear
(Kingdom line 43) - ____
food
(Kingdom line 43) - ____
showMessageDialog
(Kingdom line 23)