What do you mean by inheritance?

Showing Answers 1 - 1 of 1 Answers

samiksc

  • Jan 25th, 2006
 

Inheritance is using a generalized class to derive a more specific functionality without re-writing the existing basic functionality code.

A base class or parent class contains generalized functions. A derived class reuses the base class functions and extends the class by providing new functions suited for its design logic. It also may replace some of base class functions to suit its needs.

For example a shape class may be a parent class and a class triangle derives from it.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions