1.

Can the derived class be made abstract if multiple inheritance is used?(a) No, because other classes must be abstract too(b) Yes, if all the functions are implemented(c) Yes, if all the methods are predefined(d) No, since constructors won’t be thereThis question was posed to me in homework.My enquiry is from Multiple Inheritance topic in chapter Inheritance & its Types of Object Oriented Programming

Answer»

Right choice is (d) No, since constructors won’t be there

The best explanation: The derived CLASS must not be ABSTRACT. This is because the abstract classes doesn’t have CONSTRUCTOR and hence we won’t be having the capability to have instances. This will restrict the use of MULTIPLE INHERITANCE.



Discussion

No Comment Found

Related InterviewSolutions