1.

If one class have derived the base class privately then another class can’t derive the base class publically.(a) True(b) FalseThis question was addressed to me in unit test.Question is taken from Hierarchical Inheritance in section Inheritance & its Types of Object Oriented Programming

Answer»

The CORRECT answer is (b) False

To explain I would say: The classes are independent and can access the base class and INHERIT it in whichever WAY it is required. The classes can USE the base base class members privately or publically maintaining the security of data and METHODS.



Discussion

No Comment Found

Related InterviewSolutions