Tuesday, February 22, 2005

Inheritance

... is where once class derives from another, thereby aquiring the interface and implementation of the derived class (based on scoping rules of course). This allows for a significant amount of code reuse and for adapting existing, proven, tested code only as needed to create the needed functionality.

In a more sing-song way, inheritance represents and 'is-a' relationship between one class and another. For example, a Dog 'is-a' Mammal and would inherit several features from that class such as live birth, suckling young, warm-blooded and so on.

0 Comments:

Post a Comment

<< Home