Polymorphism means ______________.
A. that data fields should be declared private
B. that a class can extend another class
C. that a variable of supertype can refer to a subtype object
D. that a class can contain another class

Respuesta :

Answer:

(c) that a variable of supertype can refer to a subtype object.

Explanation:

Polymorphism, in the real sense of it, means appearing in different forms. In the programming concept, the same object can hold different data types depending on its reference. A function can take different kinds of arguments at different situations and process them accordingly. So when a variable of supertype can refer to a subtype object, polymorphism is at work.

However, when data fields are declared private (as in option a), then we have encapsulation.

Also, when a class can extend another class (as in option b), we have inheritance in action.

When a class contains another class (as in option d), we have a nested class .

Polymorphism means that a variable of a supertype can refer to a subtype object.  

A type defined by a subclass is called a subtype, and a type defined by its superclass is called a supertype. For example, a Circle is a subtype of GeometricObject and GeometricObject is a supertype for Circle.  

A subclass is a specialization of its superclass; every instance of a subclass is also an instance of its superclass, but not vice versa.  

Polymorphism means that a variable of a supertype can refer to a subtype object.  

Find out more at: https://brainly.com/question/1445077

RELAXING NOICE
Relax