Computer Science, asked by sadiquenadeem11612, 1 month ago

how is reusability supported by inheritance ? explain with example​

Answers

Answered by ZalimGudiya
2

Answer:

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 agarwaladiti262
0

Answer:

for example: human being

Explanation:

let's take a class mammal from class human which inherited the property which again inherits some property from another class animal. Thus, reusability is supported by inheritance.

Similar questions