Introduction
Inheritance helps us reuse code by letting one class get features from another. It makes programs easier to build and understand.
When you want to create a new class that is a special version of an existing class.
When you want to share common code between different classes without copying it.
When you want to organize related classes in a clear way.
When you want to add new features to an existing class without changing it.
When you want to fix or improve behavior of a class by making a new version.