July 2001
Intermediate to advanced
656 pages
15h 51m
English
The concepts CashPayment, CreditPayment, and CheckPayment are all very similar. In this situation, it is possible (and useful[1]) to organize them (as in Figure 26.1) into a generalization-specialization class hierarchy (or simply class hierarchy) in which the superclass Payment represents a more general concept, and the subclasses more specialized ones.
[1] Later in the chapter, we will investigate reasons to define class hierarchies.

Note that the discussion of classes in this chapter refers to conceptual classes, not software classes.
Generalization is the activity of ...
Read now
Unlock full access