How do you use inheritance and subtyping to organize your objects?
Object oriented design is a way of creating and organizing software components based on their properties and behaviors. One of the key concepts of object oriented design is inheritance, which allows you to reuse and extend existing code by creating subclasses from a superclass. Subtyping is a related concept that defines how subclasses can be used in place of their superclasses without breaking the program logic. In this article, you will learn how to use inheritance and subtyping to organize your objects and achieve some of the benefits of object oriented design, such as modularity, abstraction, and polymorphism.