Inheritance
Inheritance is the process by which objects of one class acquire the properties of objects of another class. It. supports the concept of hierarchical clasification. The principles behind this sort of division is that each derived class shares common characteristics with the class from existing one.In OOP, tho concept of inheritance provides the idea of reusability. This means that we can add additional features to an existing class without modifying it. This is possible by deriving a new class from the existing one. The new class will have the combined features of
both the classes. The real appeal and power of the inheritance mechanism is that it allows the programmer to reuse a class that is almost, but not exactly, what he wants, and to tailor the class in such a way that it does not introduce any undesirable side-effects into the rest of the classes.
Comments
Post a Comment