26.7. Abstract Conceptual Classes

It is useful to identify abstract classes in the domain model because they constrain what classes it is possible to have concrete instances of, thus clarifying the rules of the problem domain.

If every member of a class C must also be a member of a subclass, then class C is called an abstract conceptual class.

For example, assume that every Payment instance must more specifically be an instance of the subclass CreditPayment, CashPayment, or CheckPayment. This is illustrated in the Venn diagram of Figure 26.11 (b). Since every Payment member is also a member of a subclass, Payment is an abstract conceptual class by definition.

Figure 26.11. Abstract conceptual classes.

By contrast, if there can be Payment instances ...

Get Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.