1.

Which of the following is a mechanism that allows several objects in an class hierarchy to have different methods with the same name?(a) Aggregation(b) Polymorphism(c) Inheritance(d) All of the mentionedThis question was addressed to me by my college professor while I was bunking the class.The query is from Object Oriented Software Design in portion Software Design of Software Engineering

Answer»

The correct CHOICE is (B) Polymorphism

The explanation is: In polymorphism instances of each subclass will be free to respond to messages by calling their own version of the METHOD.



Discussion

No Comment Found

Related InterviewSolutions