subject

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 above code 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

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 17:20
Find the inverse function of f(x)= 1+squareroot of 1+2x
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Jake really works well with numbers and is skilled with computers but doesn't work well with others. which of the jobs discussed in this unit might be best for jake? why?
Answers: 3
question
Computers and Technology, 24.06.2019 08:30
Why might you choose to create a functional resume
Answers: 1
question
Computers and Technology, 24.06.2019 09:30
What is the definition of digital literacy?
Answers: 1
You know the right answer?
Assume that Student, Employee and Retired are all extended classes of Person, and all four classes h...
Questions
question
Mathematics, 08.07.2019 23:00
question
Mathematics, 08.07.2019 23:00
question
Chemistry, 08.07.2019 23:00
Questions on the website: 13722359