Inheritance is one of the three foundational principles of object oriented programming (abstraction, polymorphism and inheritance) because it allows the creation of hierarchical classifications. Using inheritance, we can generate class that defines traits common to set of related classes. This class can then be inherited by other more specific classes each adding those things that […]