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]
2 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]2 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
How is an interpreter different from a compiler?
lyudmila [28]

Answer:

An interpreter is quite different from a complier due to the following statement below:

O. An interpreter translates and executes code line by line, while a compiler translates all code at once so that it is ready to be executed at any time.

Explanation:

For an interpreter, it works in translating and execution of the codes line after another line. In a situation where there is a mistake in the code, the next line would not be able to be executed, but rather display error message. On the other hand, compiler translate all codes at once and execute them as a single work.

<em>During its translation of the codes in compiler, should there be any error, it would not be able to execute despite the fact that, the error might be in the last line of the code.</em>

7 0
3 years ago
Read 2 more answers
Use the drop-down menus to complete statements about archiving and backing up data fileArchiving data files manages the size of
svetoff [14.1K]

Answer:

Archiving data files manages the size of a mailbox for  

✔ local

storage.

Creating an Outlook data file  

✔ protects

data files in storage on a computer.

Explanation:

Because its right.

3 0
3 years ago
Read 2 more answers
The count function is used to total the values stored in numeric columns.
Dovator [93]

Answer : False.

The function to total the values stored in numeric columns is the SUM function.

5 0
3 years ago
Greg works for online games development company. He occasionally visits online literature sites and downloads e-books of his cho
zalisa [80]

(A) Yes, because nobody is supposed to access non-work related sites during office hours.

3 0
3 years ago
Read 2 more answers
Which of the these is tool for creating mobile apps? A:C# B:Apple Pie C:Appy Pie D:C++​
Ratling [72]

Answer:

bhsjsbsbsb

Explanation:

<h3><em>bejwnsusb</em></h3>
4 0
2 years ago
Read 2 more answers
Other questions:
  • A typical serial cable has
    13·1 answer
  • Why is it important to use proper line types
    13·1 answer
  • What are five most important areas of the animal industry that involve science and technology?
    14·1 answer
  • Que Inventos Importantes se Crearon durante la edad de agua y viento
    11·1 answer
  • The "Rudolph Rule" is best described by which of the following?
    9·1 answer
  • Which part of a touchscreen responds to pressure applied to its surface?
    6·1 answer
  • Select the correct answer.
    12·1 answer
  • Which of the following is the correct financial function that returns the periodic payment for a loan?
    10·1 answer
  • Rounding up and down for 389,422
    7·1 answer
  • Drag each label to the correct location on the image. Match the movie qualities with the right period of movies.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!