Which three statements are true about inheritance?
A.
Inheritance helps to reuse existing code implementations.
B.
It should be possible to substitute the derived class for its base class.
C.
Inheritance allows you to modify the behavior of objects.
D.
Inheritance promotes encapsulation better than interfaces.
E.
The derived class must override all methods of the base class.
I dont agree with D. Inheritance by itself doesnt promote encapsulation. If you inherit from a base class nothing is really encapsulated. Having an interface and a different implementation on the other hand does promote encapsulation
http://www.developer.com/design/article.php/10925_3525076_2/Encapsulation-vs-Inheritance.htm
B is 100% correct.
a, b, c
ABC
ABC
A. Inheritance helps to reuse existing code implementations. (That’s one the main purposes)
B. It should be possible to substitute the derived class for its base class. (Absolutely)
C. Inheritance allows you to modify the behavior of objects. (Overriding behavior).
A B C
ABC