| Inheritance |
| |
| The Benefits of Inheritance |
| |
| . Subclasses provide specialized behaviors from the basis
of common elements provided by the superclass. Through the use
of inheritance, programmers can reuse the code in
the superclass many times. |
| |
| . Programmers can implement superclasses called abstract
classes that define "generic" behaviors. The abstract superclass
defines and may partially implement the behavior but much of
the class is undefined and unimplemented. Other programmers
fill in the details with specialized subclasses. |
| |
| |
| |
| |
| |
|
|
| |
| |