Computer Science, asked by rajroshan684, 1 year ago

what do u understand by terms inheritance in OOP ? how is it implemented in C++

Answers

Answered by steeve
2
In object-oriented programming, inheritanceis when an object or class is based on another object (prototypal inheritance) or class (class-based inheritance), using the same implementation. Inheritance in most class-based object-oriented languages is a mechanism in which one object acquires all the properties and behaviours of the parent object. Inheritance allows programmers to: create classes that are built upon existing classes [1], to specify a new implementation to maintain the same behaviour (realizing an interface), to reuse code and to independently extend original software via public classes and interfaces. The relationships of objects or classes through inheritance give rise to a directed graph.
Similar questions