One of the most important concepts in OOP is inheritance. Inheritance between classes allows us to define an is-a-type-of relationship; for example, a car is a type of vehicle. The importance of this concept is that it allows for objects of the same type to share similar features. Let's say that we have a system for managing different products of an online bookstore. We might have one class for storing information about a physical book and a different one for storing information about a digital or online book. The features that are similar between the two, such as the name, publisher, and author, could be stored in another class. Both the physical and digital book classes could then inherit from the other class.
There are different terms to describe classes in inheritance: a child or derived class inherits from another class while the class being inherited from...