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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started