Question: What is a polymorphic method? Select one: a. Polymorphism happens anywhere, it doesn't require a class hierarchy. Within a same class, two polymorphic methods M1

What is a polymorphic method?

Select one:

a. Polymorphism happens anywhere, it doesn't require a class hierarchy. Within a same class, two polymorphic methods M1 and M2 have the same signatures but different algorithm: M1 and M2 are polymorphic.

b. Polymorphism happens in a classes' inheritance hierarchies. A method called M1 in classes A, B, C, where B derives from A and C derives from B, has the same signature but a different implementation: M1 is polymorphic.

c. Polymorphism happens anywhere, it doesn't require a class hierarchy. Within a same class, two polymorphic methods M1 and M2 have different signatures but the same algorithm: M1 and M2 are polymorphic. Or within two classes A and B, where B derives from A, M3 belongs to A and M4 belongs to B. M3 and M4 have different signatures but the same algorithm: M3 and M4 are polymorphic.

1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!