Klaus

HAS-A or IS-A

 Mon, 17 Apr 2017 23:40:29 +0200 
#^Composition over inheritance - Wikipedia
Image/photo

Composition over inheritance (or composite reuse principle) in object-oriented programming is the principle that classes should achieve polymorphic behavior and code reuse by their composition (by containing instances of other classes that implement the desired functionality) rather than inheritance from a base or parent class.[2] This is an often-stated principle of OOP, such as in the influential book Design Patterns.