Is Inheritance Important To Oop?

196 Words1 Pages
Inheritance is important to oop because it allows a new class to be created from an existing class. The base class, which is the existing class, is able to share some of its basic features with the new class that is known as subclass. This enables the subclass to use the base class as, for example, a blueprint for what it would like to do which means the subclass does not need to 're-write its own method each time it wants to expand and add its own features. For example, the base class is the blueprint of a building, the subclasses use this blueprint and expand into different types of buildings from the basic features they have inherited (ie bungalow or hotel). This also means that the base class can choose what the subclasses inherit by hiding