Which three statements are true about inheritance?

Which three statements are true about inheritance?

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.



Leave a Reply 9

Your email address will not be published. Required fields are marked *


Pesho

Pesho

B is 100% correct.

Jose Said

Jose Said

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).

Stephen Ubogu

Stephen Ubogu

A B C