1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Juliette [100K]
3 years ago
6

Assume the Student and Employee classes each extend the Person class. The Student class overrides the getMoney method in the Per

son class. Consider the following code: Person p1, p2, p3; int m1, m2, m3; p1 = new Person(); m1 = p1.getMoney(); // assignment 1 p2 = new Student(); m2 = p2.getMoney(); // assignment 2 p3 = new Employee(); m3 = p3.getMoney(); // assignment 3 The reference to getMoney in assignment 3 is to the ________ class.
Computers and Technology
1 answer:
SSSSS [86.1K]3 years ago
6 0

Answer:

Person p1, p2, p3;

int m1, m2, m3;

p1 = new Person();

// assignment 1

m1 = p1.getMoney();

p2 = new Student();

// assignment 2

m2 = p2.getMoney();

p3 = new Employee();

// assignment 3

m3 = p3.getMoney();

//////////////////////////////////////////////////////////////////////////////////////////////

The reference to getMoney in assignment 3 is to the <em>Person</em> class.

Explanation:

Since Employee class didn't override Person class's getMoney() method, calling p3 with getMoney() will call Base class's (Person) getMoney() method.

You might be interested in
You must have an active ____ to test external links.
charle [14.2K]
Network & internet connection
4 0
4 years ago
Dose anyone know how to change username, grade level, and gender here? I have tried it in the change preferences and it says it
alukav5142 [94]

Answer:no I don’t, sorry

Explanation:

6 0
3 years ago
Read 2 more answers
To lose weight, you must _______.
sweet [91]

Answer:

B

Explanation:

because you need to exercise and eat or drink less calories

8 0
3 years ago
Read 2 more answers
When making an assembly of design what command is most.commonly used?
Schach [20]
There are two common command lines used in creating design assembly. The 'push' and 'pull' command. Both allows you to get parts from the original predelivered content's source desgian    and recreate the design faster and with less memory.
6 0
3 years ago
Where is the Outlook Search Folder located?
melamori03 [73]
When you go to the mail go to file and click new it should be in there as search folder
6 0
3 years ago
Other questions:
  • Your company is developing a new marketing campaign and wants to know which customers have never placed an order. You will need
    10·1 answer
  • How do I learn coding??? ​
    5·2 answers
  • What is an activity that can help you enhance the appearance of your computer’s desktop?
    12·2 answers
  • Word 2013 in order to share a document online you must first
    10·1 answer
  • Stating a document is PDF or XPS document refers to document _______​
    10·1 answer
  • Celeste is writing a paper. However, two pages in, her computer shuts down unexpectedly. She never saved her paper, and all her
    12·2 answers
  • The 8-bit ____ field is used by source network hosts and forwarding routers to distinguished classes or priorities in ipv6 packe
    11·1 answer
  • In C++ please.
    8·1 answer
  • Which of the following is true of a procedure? Check all that apply.
    10·2 answers
  • How do i fix this to make it run ???
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!