Alternatives of Inheritance:
1. Delegation is an alternative to inheritance.
2. Delegation denotes that you include an instance of any class as an instance variable, and forward messages to the instance.
3. It is safer than inheritance because it ceases you to think about forwarded message , because the
instance is of a known class, rather than a new class, and because it doesn’t force you to accept all the
methods of the super class: you can provide only the methods that really make sense.
4. On the other hand, it makes you write more code, and it is harder to re-use (because it is not a subclass).