Multiple Choice
For the questions below, assume that Student, Employee and Retired are all extended classes of Person, and all four classes have different implementations of the method getMoney. Consider the following code where ... are the required parameters for the constructors:
Person p = new Person(...) ;
int m1 = p.getMoney( ) ; // assignment 1
p = new Student(...) ;
int m2 = p.getMoney( ) ; // assignment 2
if (m2 < 100000) p = new Employee(...) ;
else if (m1 > 50000) p = new Retired(...) ;
int m3 = p.getMoney( ) ; // assignment 3
-The reference to getMoney( ) in assignment 3 is to the class
A) Person
B) Student
C) Employee
D) Retired
E) none of the above, this cannot be determined by examining the code
Correct Answer:

Verified
Correct Answer:
Verified
Q10: Why is it a contradiction for an
Q13: If classes C1 and C2 both implement
Q19: For the questions below, assume that Poodle
Q20: A variable declared to be of one
Q22: For the questions below, consider the following
Q23: Write the init and paint methods of
Q25: For the questions below, use the following
Q27: For the next questions, consider the following
Q28: Consider the following class hierarchy and answer
Q29: As described in the Software Failure, the