26.4. When to Define a Conceptual Subclass

Rules to ensure that a subclass is correct have been examined (the Is-a and 100% rules). However, when should we even bother to define a subclass? First, a definition: A conceptual class partition is a division of a conceptual class into disjoint subclasses (or types in Odell's terminology) [MO95].

The question may be restated as:

“When is it useful to show a conceptual class partition?

For example, in the POS domain, Customer may be correctly partitioned (or subclassed) into MaleCustomer and FemaleCustomer. But, is it relevant or useful to show this in our model (see Figure 26.6)?

Figure 26.6. Legal conceptual class partition, but is it useful in our domain?

This partition is not useful for our domain; ...

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.