Which term is used to describe this object-oriented concept?

The Dog class and the Cat class inherit from the Animal class. The Animal class includes a
breathe() method and a speak() method. If the speak() method is called from an object of
type Dog, the result is a bark. If the speak() method is called from an object of type Cat, the
result is a meow.
Which term is used to describe this object-oriented concept?

The Dog class and the Cat class inherit from the Animal class. The Animal class includes a
breathe() method and a speak() method. If the speak() method is called from an object of
type Dog, the result is a bark. If the speak() method is called from an object of type Cat, the
result is a meow.
Which term is used to describe this object-oriented concept?

A.
multiple inheritance

B.
encapsulation

C.
polymorphism

D.
data hiding



Leave a Reply 1

Your email address will not be published. Required fields are marked *


Carlos

Carlos

Should be C, polymorphism