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, 23.06.2019 17:00
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the can apple do to fix this issue?
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
What software programs are used to to create professional publication? a.) graphics programs b.) word processors c.) page layout programs d.) spreadsheet programs
Answers: 2
question
Computers and Technology, 24.06.2019 08:50
Write a program that will compute the volume of ice cream served in a cone. as you can see in the diagram below, the ice cream is served as a hemisphere of frozen deliciousness on top of a cone, which is also packed with frozen deliciousness. thus, the total volume of ice cream sold is the volume of the hemisphere plus the volume of the cone. the example shows an ice cream cone in which the hemisphere and cone have a radius of 10 inches and the cone has a height of 15 inches. your program must instead prompt for these two values, which are taken from the keyboard as integers: • the hemisphere/cone radius in inches, and
Answers: 3
question
Computers and Technology, 24.06.2019 11:40
100 pts. first person gets brainliest
Answers: 2
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, 23.02.2021 03:30
question
Mathematics, 23.02.2021 03:30
question
Mathematics, 23.02.2021 03:30
question
Mathematics, 23.02.2021 03:30
question
Mathematics, 23.02.2021 03:30
Questions on the website: 13722359