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]
3 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]3 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
What computer company was founded in 1975?
erica [24]
Microsoft company was founded in 1975
6 0
3 years ago
2. Name the three building blocks of design that pertain to form.
inna [77]

Answer:

Point, Line, Shape,Form, Color, Value, and Texture.

Explanation:

The elements of design, are the building blocks used by the designers to create the designs. ...

Point, Line, Shape,Form, Color, Value, and Texture.

3 0
3 years ago
To add a glow effect to WordArt text, which of the following should be done?
g100num [7]
Number 2 is the correct answer
8 0
2 years ago
In Broadbent's filter model of attention, the stages of information processing occur in which order?
victus00 [196]

Answer:SENSORY STORE, FILTER, DETECTOR, STM.

Explanation:Donald Broadbent in 1958 stated one of the earliest theory of attention,he stated that physical features of messages are used to select one message for further processing and that all others are lost.This differs from inattentional blindness, which is when you focus hard on something and fail to notice unexpected things entering your visual area. He believes that

Information from all of the stimuli presented at any given time enters a sensory buffer with unlimited capacity.

3 0
3 years ago
When listing columns in the select list, what should you use to separate the columns?
Gala2k [10]
The answer is commas.  <span>When listing columns in the select list, commas should be used to separate the columns.</span>
6 0
3 years ago
Other questions:
  • In microsoft word, when you highlight existing text you want to replace, you’re in
    14·1 answer
  • what evidence supports the claims that the Taj Mahal is a symbol of historical and cultural glory as well as an architectural ma
    8·1 answer
  • To hide gridline when you display or print a worksheet
    14·1 answer
  • Movies may depict larger-than-life situations, such as calamities, superheroes, and spaceships. A helps show such extraordinary
    11·1 answer
  • Review the two e-mail messages below for their adherence to the guidelines for professional e-mail correspondence you have learn
    6·1 answer
  • Give two advantages of representing integers in pure binary.
    5·1 answer
  • Final one bit l y links are a virus that will corrupt your files do not go on it
    15·2 answers
  • When installing a Windows 10 an already installed Windows 7 what happen​
    11·2 answers
  • Running away from home
    11·2 answers
  • if the wide area network (wan) is supporting converged applications like voice over internet protocol (voip), which of the follo
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!