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.

244<br />

Sunday Morning<br />

REVIEW<br />

The Sequence diagram provides the events that can affect an object’s condition. It also<br />

helps to identify the periods of time between the changes caused by the events. These<br />

periods of time when the object remains unchanged may represent states on the Statechart<br />

diagram.<br />

<strong>To</strong> derive the Statechart from the Sequence diagrams, use the following steps:<br />

1. Identify the events directed at the lifeline of the object you’re modeling.<br />

2. Identify candidate states by isolating the portions of the lifeline between the<br />

incoming events.<br />

3. Name the candidate states using adjectives that describe the condition of the<br />

object during the period of time represented by the gap.<br />

4. Add the new states and events to the Statechart diagram.<br />

Remember that the scope of the Sequence diagram is only one scenario. The scope of the<br />

Statechart diagram is the entire life of the object, so it may take many Sequence diagrams<br />

to build one Statechart.<br />

QUIZ YOURSELF<br />

1. On a Sequence diagram, which events may change an object (See “Deriving a<br />

Statechart from Sequence Diagrams.”)<br />

2. How do you identify a candidate state on a Sequence diagram (See “Deriving a<br />

Statechart from Sequence Diagrams.”)<br />

3. If an event on the Sequence diagram causes a change to the object, how do you<br />

model it on the Statechart diagram (See “Deriving a Statechart from Sequence<br />

Diagrams.”)<br />

4. What do you do if an event does not cause a change in the object it is directed at<br />

(See “Deriving a Statechart from Sequence Diagrams.”)<br />

5. What kind of word is good for naming a state (See “Deriving a Statechart from<br />

Sequence Diagrams.”)

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

Saved successfully!

Ooh no, something went wrong!