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
During the Requirements Definition stage of a systems development​ project, the employees who will be the primary users of the n
Lisa [10]

Answer:

enabling users to contribute to requirements for new system features and functions

Explanation:

Based on the scenario being described within the question it can be said that the main responsibility that is being violated is enabling users to contribute to requirements for new system features and functions. They are responsible for gathering user feedback, in order to get a sense of what the user's like and dislike regarding a system in order to later make the necessary changes needed to the system.

8 0
3 years ago
Why is it important to ensure that dns servers have been secured before implementing an e-mail system? awr138?
Alex
So you don’t get black listed as spam for outgoing mail, and I hope this one is obvious - to make sure the server isn’t vulnerable to hackers and malware.
7 0
3 years ago
Describe Mr. Digby, the principal. ​
Gennadij [26K]

Answer:

stinky

Explanation:

7 0
3 years ago
Which statement describes the relationship between science and technology?
Elden [556K]
Answer: science is the study of the world, and technology changes the world to solve problems.
3 0
2 years ago
Read 2 more answers
Assessment timer and count Assessment items Item 6 How many different keys can be used in a single sort? 1 2 3 4
Alik [6]

Answer:

Its C 3. hope this helps

Explanation:

6 0
3 years ago
Other questions:
  • 0.005098 megaliters to liters. Show your work.
    11·1 answer
  • The True Confessions of Charlotte Doyle begins with what is called a(n) _____.
    15·1 answer
  • What is an examlple of cyberbullying
    5·1 answer
  • A device (or a software program on a computer) that can monitor data traveling on a network is known as a socket sniffer. ______
    15·1 answer
  • What are the useful techniques in program design?
    12·1 answer
  • Cryptcat is a Linux distribution that includes hundreds of security and hacking tools, including Nessus and Metasploit. It can p
    11·1 answer
  • Discuss two basic types of monitors CRT and LCD give me in short ​
    9·2 answers
  • Hey im b---o---r---e---d dont report cuz if u do ur l a m e :)
    14·1 answer
  • Which of the following is true about stateless applications?
    9·1 answer
  • What is the decimal number 86 when written as a
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!