1.

Which problem may arise if we use abstract class functions for polymorphism?(a) All classes are converted as abstract class(b) Derived class must be of abstract type(c) All the derived classes must implement the undefined functions(d) Derived classes can’t redefine the functionThe question was posed to me in final exam.The doubt is from Polymorphism topic in chapter OOPs Concept & Features of Object Oriented Programming

Answer»

Correct option is (c) All the derived CLASSES must implement the undefined functions

The best EXPLANATION: The undefined functions must be defined is a problem, because one may need to implement few undefined functions from abstract class, but he will have to DEFINE each of the functions DECLARED in abstract class. Being USELESS task, it is a problem sometimes.



Discussion

No Comment Found

Related InterviewSolutions