subject

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 2 is to the class?

Question 18 options:

A)
Retired

B)
Employee

C)
Person

D)
Student

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 09:30, caromaybelline71
Write an essay on online collaboration, how to do it, the challenges, resolving the challenges, and consider whether the risks are greater than rewards. ( need )
Answers: 1
image
Computers and Technology, 23.06.2019 14:30, naomi20044
Select the correct answer. andy received a potentially infected email that was advertising products. andy is at risk of which type of security threat? a. spoofing b. sniffing c. spamming d. phishing e. typo-squatting
Answers: 2
image
Computers and Technology, 25.06.2019 05:00, Kadyn5
Carmina works at a fast-food restaurant. during the slow afternoon hours, carmina always find projects to keep her busy, like washing all the trays or deep-cleaning the drive-thru area. what workplace habit does carmina show by doing this? efficiency initiative interpersonal skills problem solving
Answers: 1
image
Computers and Technology, 25.06.2019 08:00, zairam2002
True or false: a power supply is an electrical transformer that regulates the electricity used by the computer.
Answers: 1
You know the right answer?
For the questions below, assume that Student, Employee and Retired are all extended classes of Perso...

Questions in other subjects: