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
How many tables are needed to implement an REA data model that has five distinct entity-sets, two many-to-many relationships and
azamat

Answer:

B

Explanation:

Im not sure tho so please dont get mad if its wrong

8 0
3 years ago
What is the best Genshin impact ship? My favorite is Xiao x Lumine. Put yours bellow.
denis-greek [22]

XIAO X LUMINE AAA

Explanation:

6 0
3 years ago
Read 2 more answers
Given the following word addresses: 3, 180, 43, 2,191, 88, 190, 14, 181, 44, 186, 253
professor190 [17]

Answer:

A. index bits = 2, tag bits = 2, block offset bits = 1, it is a miss.

B. index bits = 2, tag bits = 1, block offset bits = 0, it is a hit

C. the miss rate is 0

Explanation:

a. number of blocks = 12

number of blocks per set = 3

number of set = number of blocks / number of blocks per set = 12/3 = 4

word size = 24

block size = 2

the block offset = log_{2} block size

   = log_{2} 2 = 1

the index bits = log_{2} number of set = log_{2} 4 = 2

the tag bits = (log_{2} word size) - offset - index = (log_{2} 24) -2 - 1 = 5 -2 - 1 = 2

b. word size = 8

block size = 1

the block offset = log_{2} block size

   = log_{2} 1 = 0

the index bits = log_{2} number of set = log_{2} 4 = 2

the tag bits = (log_{2} word size) - offset - index = (log_{2} 8) -2 - 1 = 3 - 0- 2= 1

7 0
3 years ago
Based on the module,
svp [43]

Answer:

Explanation:

One group of students did an experiment to study the movement of ocean water. The steps of the experiment are listed below.

Fill a rectangular baking glass dish with water.

Place a plastic bag with ice in the water near the left edge of the dish.

Place a lighted lamp near the left edge of the dish so that its light falls directly on the plastic bag.

Put a few drops of ink in the water.

The student did not observe any circulation of ink in the water as expected because the experiment had a flaw. Which of these statements best describes the flaw in the experiment? (2 points)

Not enough ink was added.

Not enough water was taken.

The dish was too small for the experiment.

The lamp and the ice bag were at the same place.

8 0
3 years ago
Let cell E2 = 100, what is the result of this formula? =NOT(E2&lt;100) *
lukranit [14]

Answer:

True

Explanation:

7 0
3 years ago
Other questions:
  • Assume the input data is structured as follows: first there is a non-negative integer specifying the number of employee timeshee
    9·1 answer
  • Windows Server 2012 R2 provides hardware-independent NIC teaming or bonding to allow for better network performance and adapter
    6·1 answer
  • write a program that first asks the user to enter three real numbers using GUI input. Print the sum if all three numbers are pos
    7·1 answer
  • Why are computers assigned IP addresses
    15·1 answer
  • To convince the server that a user is authentic, the authentication server creates a _________ that contains the user's ID and n
    13·1 answer
  • True or false: in order to keep yourself and co workers safe, you must be able to recognize electrical hazards
    8·2 answers
  • Everytime my daughter tries to ask for an app, or a money thing inside an app.. The request won't go through. Anybody know how t
    12·1 answer
  • What is subscriber billing in Google Play and where does the money go?
    5·1 answer
  • Write a program that will ask the user for three different numerical values. The program should then decide whether the values a
    13·1 answer
  • An international pharmaceutical company is fully compliant with local and international regulations. However, they suffered a ma
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!