Computer Science, asked by palak9003, 1 year ago

Example of siper class sub class inheritance gerlizatin and sulerlizaton

Answers

Answered by prashanth1551
0
In object-oriented programming, inheritanceis the mechanism of basing an object or classupon another object (prototypical inheritance) or class (class-based inheritance), retaining similar implementation. In most class-based object-oriented languages, an object created through inheritance (a "child object") acquires all the properties and behaviors of the parent object (except: constructors, destructor, overloaded operators and friend functions of the base class). Inheritance allows programmers to create classes that are built upon existing classes,[1] to specify a new implementation while maintaining the same behaviors (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.Inheritance was invented in 1969 for Simula.[2]
Similar questions