Types of Inheritance
The common structural forms of inheritance include single, multilevel and hierarchical inheritance. Single inheritance means one child derives from one parent. Multilevel inheritance forms a chain where one derived class becomes the base for another. Hierarchical inheritance has multiple child classes derived from the same parent. Some languages also support multiple inheritance of classes, while Java and C# intentionally restrict class inheritance to avoid ambiguity and complexity.
Single: A -> B.
Multilevel: A -> B -> C.
Hierarchical: A -> B and A -> C.
Multiple inheritance: A class derives from multiple parent classes; language support varies.
Deep inheritance hierarchies can increase coupling and make changes difficult.