Question: Inheritance styles in C++: -. private inheritance -. Public inheritance -. Protected Inheritance -. Multiple inheritance -. Multilevel inheritance -. Hierarchical inheritance - Hybrid inheritance

Inheritance styles in C++:

-.

private inheritance

-.

Public inheritance

-.

Protected Inheritance

-.

Multiple inheritance

-.

Multilevel inheritance

-.

Hierarchical inheritance

-

Hybrid inheritance

A.

The "Is A" relationship propagates throughout the generations of inheritance the child "is a" parent and "is a" grandparent,etc.

B.

The default means of inheritance. Visibility modifiers aren't changed from parent to child.

C.

Combines multiple other concepts and leverages them to compose a child from different parents in the same family structure. Comes with problems though ...

D.

Usually where polymorphism is expressed. You can create any number of siblings in inheritance .

E.

Acts as a way to trim the public interface of the parent so only the child's public interface remains.

F.

The ability to create a child class from multiple parents

G.

Makes everything inherited from the parent private in the child. Rarely used.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!