InterviewSolution
Saved Bookmarks
| 1. |
Is it possible to have all the abstract classes as base classes of a derived class from those?(a) Yes, always(b) Yes, only if derived class implements all the methods(c) No, because abstract classes doesn’t have constructors(d) No, neverI had been asked this question during an online interview.My doubt is from Multiple Inheritance topic in portion Inheritance & its Types of Object Oriented Programming |
|
Answer» RIGHT CHOICE is (B) Yes, only if derived class implements all the methods Explanation: The condition for abstract class applies same here too. All the UNDEFINED functions MUST be defined. Hence all the base classes can be abstract but derived class must implement all those undefined functions. |
|