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
goldenfox [79]
4 years ago
15

If I have an Animal superclass with a Mammal subclass, both concrete and both having a method called eat() with identical signat

ures and return types, polymorphism means:________.
a. the Animal version of eat() will be called, regardless of the static/dynamic type.
b. the Mammal version of eatſ) will be called, regardless of static/dynamic.
c. the dynamic type of the reference will determine which of the methods to call.
d. the static type of the reference will determine which of the methods to call.
Computers and Technology
1 answer:
Katarina [22]4 years ago
5 0

Answer:

(c) the dynamic type of reference will determine which of the methods to call.

Explanation:

Polymorphism in Object Oriented Programming typically means the same method name can cause different actions depending on which object it is invoked on. Polymorphism allows for dynamic binding in that method invocation is not bound to the method definition until the program executes.

So in the case of Animal superclass and Mammal subclass, both having a method called eat() with identical signatures and return types, depending on which reference, the correct method eat() will be called dynamically upon execution.

For example, if we have the following;

================================

<em>Mammal mammal = new Animal();</em>

<em>mammal.eat()</em>

================================

The eat() method that will be called is the one in the Mammal subclass.

However, if we have;

================================

<em>Animal animal = new Animal();</em>

<em>animal.eat()</em>

================================

The eat() method of the Animal superclass will be called.

You might be interested in
In this for loop, identify the loop control variable, the initialization statement, loop condition, the update statement, and th
KATRIN_1 [288]

Answer:

Follows are the solution to these question:

Explanation:

Please find the complete question in the attached file.

For point a:

The "j" is the loop control variable that controls this loop  

For point b:

The initialized statement for the given loop is "j = 1"

For point c:

The loop condition for the given loop is "j<=10" which indicates that the value of j is less than equal to 10.

For point d:

The loop given statement that updates the value of the s is "s = s+j*(j-1)".

8 0
3 years ago
Plz answer and dont put a random thing for the points
Anton [14]

<u><em>answer</em></u>: it it mostly likely to be the one that says "choose font style"

<u><em>explain</em></u>: im in advanced tech class so i think i know what this is:D

hope i helped you!:D

6 0
3 years ago
A stateful inspection firewall ________. select one:
mart [117]

;) https://quizlet.com/7016715/cyber-security-flash-cards/ go check the link

6 0
3 years ago
I’m quitting this thing so I’m giving all my points away which are 218!!! I’m still gonna have more tho just in case I ever need
Sedaia [141]

Answer:

skdjdishsjsbsisjsjsjsjsnssnsjsjsjsjsjsjjskdxkjdsisi

4 0
3 years ago
Read 2 more answers
State whether True / False:<br>The pause option stops the recording temporarily.*<br>True<br>False​
defon

Answer:

true

Explanation:

when you pause a recording it will temporarily stop but, when you hit record again it will continue where you left off

7 0
3 years ago
Other questions:
  • You have been asked to create an authentication security plan for your company. Which of the following components would you inco
    14·1 answer
  • Why do nonprofit agencies often include blogs on their websites?
    5·1 answer
  • Asking yourself questions can help you think of what to _____, in order to get answers.
    8·1 answer
  • For this assignment you must do the following tasks in order: (1) START EARLY. (2) READ THE ASSIGNMENT MULTIPLE TIMES to underst
    13·1 answer
  • What is the name of the worm that was written in 1988 that could replicate itself across computers on the internet?
    7·1 answer
  • Consider two different implementations of the same instruction set architecture (ISA). The instructions can be divided into four
    14·1 answer
  • This is your data.
    11·2 answers
  • Write a method that evaluates to true or false depending on whether a box completely fits inside another:
    12·1 answer
  • Retail products are identified by their Universal Product Codes (UPCs). The most commonform of a UPC has 12 decimal digits: The
    8·1 answer
  • A computer cannot boot if it doesn't have ?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!