Question 1-1

Select which of the following best describes the purpose of each of the circled pieces of the code. (Note that some choices may not appear at all, and others may occur multiple times.)

A. class method definition
B. instance method definition
C. constructor method definition
D. class variable declaration
E. instance variable declaration
F. local variable declaration

Solution

a. E. instance variable
b. E. instance variable
c. C. constructor method
d. B. instance method
e. B. instance method
f. F. local variable

Back to Midterm 1