Please enable JavaScript.
Coggle requires JavaScript to display documents.
Inheritance - Coggle Diagram
Inheritance
Types
-
-
-
-
Hierarchical
1 base class and multiple subclasses, each with their own subclasses and so on
-
-
-
Disadvantages
.NET languages do not allow multiple, multipath or hybrid inheritance
"The Diamond Problem"
Through multiple inheritance, a subclass has 2 copies of a method
-
-
Alternatives
Composition
Objects are placed within each other. (Not A is B, but A has B)
-
-
-
-