What are the alternatives to inheritance?
Delegation is an alternative to inheritance. Delegation denotes that you include an instance of any class as an instance variable, and forward messages to the instance. 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 … Read more