May 2002
Intermediate to advanced
416 pages
8h 37m
English
Classes arranged in a generalization hierarchy may also have lifecycles formalized using state machines. Depending on the behavioral differences between the subclasses, we may choose to model separate lifecycles for each subclass or a single lifecycle for the superclass.
Figure 6.13 on page 97 showed how the Product is divided into subclasses for Books, Recordings, and Software. This distinction, however, does not make a difference to the basic lifecycle of a Product. All products are proposed, approved for sale, finally discontinued from sale, and possibly reinstated. Since this basic lifecycle applies to all types of Product, we formalize a single superclass state ...
Read now
Unlock full access