Inheritance is both Extension and Contraction

Is a child class an extension or a contraction of the parent? In fact, it is both. Because the child class has all the behavior of the parent, and can add more, it is an extension. But because the child class can override that behavior to make it fit a specialized situation, it is a restriction or a contraction of the parent.

THis interplay between inheritance and overriding, extension and contraction, generalization and specialization, is what allows object-oriented systems to include very general tools and specialize then for specific projects. This interplay is ultimately the source of the power for OOP.

[audio] [real] Text to accompany slidexx, in Chapter 8 of An Introduction to Object-Oriented Programming