May 2002
Intermediate to advanced
416 pages
8h 37m
English
When you come to build the statechart diagram for a class, take the perspective of an object and ask what you need to do to fulfill your destiny. (See [1] for an example of this type of thinking.)
A Shipment, for example, has to make something happen to cause itself to be packed, sent, and delivered to the customer. There's no point in just lying around waiting to be delivered. A Shipment needs to pack itself. Once packed, it needs to get picked up by the shipping company and then delivered to the Customer. The shipment drives itself through a sequence of states, as shown in Figure 12.1.
Contrast the lifecycle of Figure 12.1 with an approach ...
Read now
Unlock full access