Computer Science, asked by karan6814, 10 months ago

how is inheritance useful in reuse of code​

Answers

Answered by Vintage
20

Inheritance is that property of object oriented programming which allows users to reduce coding by just inheriting some features of existing class or object.

To consider practical example, if you have to create a Unit of entity as student then create various classes or objects storing academic details, residential details, contact details, etc. to display all at once just call all the objects or classes and thus the code once written is reused...

Answered by calli321
8

Answer:

Inheritance allows programmers to create classes that are built upon existing classes ,to specify a new implementation while maintaining the same behaviours, to reuse code and to independently extend original software via public classes and interfaces.

I hope this may help you

Similar questions