Computer Science, asked by khusig9146, 1 year ago

Define Inheritance and explain.

Answers

Answered by omegads04
0

Inheritance is a mechanism in which one class acquires the property of another class . For example, a child inherits the traits of his / her parents . With inheritance, we can reuse the fields and methods of the existing class .

Answered by cyrusbishop
0

Answer:

Inheritance is the process by which objects of one class can link and share some common properties of objects from another class.

Eg- The figure circle is a part of the class two-dimentional, which in turn is a part of the class mensuration.

We can see the hierarchical classifications in the given figure. Here, each derived class shares common characteristics with the class from where it is derived.

Similar questions