5.4 Composition vs. inheritance
Composition is generally used when you want the features of an existing class inside your new class, but not its interface.
When you inherit, you take an existing class and make a special version of it.
Next Page