01.01.2015 Views

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SESSION<br />

23<br />

Applying the Extended Statechart<br />

Features to the Case Study<br />

Session Checklist<br />

✔ Deriving a Statechart diagram from a Sequence diagram<br />

✔ Building a Statechart diagram for the case study<br />

Those who use the <strong>UML</strong> diagrams often miss the benefit of building and comparing the<br />

different diagrams. Each diagram provides a unique view of the same problem.<br />

Comparing and contrasting these views can function much like reconciling your checkbook.<br />

Given multiple sources of the same information, it is much easier to find and correct<br />

errors.<br />

Deriving a Statechart from Sequence Diagrams<br />

The dynamic model provides two diagrams that model changes over time: the Statechart diagram<br />

and the Sequence diagram. The key to understanding the relationship between these<br />

diagrams is in understanding states and events. Events trigger transitions between states.<br />

States capture the condition of an object during the period of time between transitions.<br />

Using this understanding, look at the Sequence diagram shown in Figure 23-1.<br />

In Figure 23-1, each vertical column represents the lifeline for one object. Each event<br />

directed at a lifeline represents an event that may trigger a change in that object. The space<br />

between events on the lifeline represents a period of time when the object remains in the<br />

same condition or state. Because not every event causes a state transition, these periods are<br />

referred to as candidate states until it’s proven that a change, in fact, occurs.<br />

The events pointing outward from the object lifeline represent either return values sent<br />

to other objects or send events.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!