Multiple Choice
Example Code Ch 09-6
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 ... indicates 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
-Refer to Example Code Ch 09-6: The reference to getMoney() in assignment 1 is to the class
A) Person
B) Student
C) Employee
D) Retired
E) This cannot be determined by examining the code
Correct Answer:

Verified
Correct Answer:
Verified
Q28: Example Code Ch 09-6<br>Assume that Student, Employee
Q29: Example Code Ch 09-1<br>Consider the following class
Q30: Example Code Ch 09-2<br>Assume that Poodle is
Q31: The reserved word, extends, is used to
Q32: Java doesn't support multiple inheritance; but it
Q34: Example Code Ch 09-3<br>Consider the class Car
Q35: Example Code Ch 09-4<br>Given the following partial
Q36: Which of the following is not a
Q37: The protected visibility modifier provides the best
Q38: Example Code Ch 09-6<br>Assume that Student, Employee