Introduction
Inheritance lets one class get features from another class. It helps reuse code and organize programs better.
When you want a new class to have all features of an existing class plus some new ones.
When you want to model real-world relationships like a Dog is a kind of Animal.
When you want to share common code among several classes.
When you want to extend or modify behavior of existing classes.