Creating a statechart for the evNotify event

About this task

You must add a statechart to the SDM that shows the evNotify actions. When the evNotify event is generated (representing a criminal's break-in to the protected building), the event is received by SDM, and the Notify operation is called. Follow these steps to add the statechart:

Procedure

  1. Right-click the SDM class in the diagram.
  2. Select New Statechart.
  3. Select the State icon from the Drawing toolbar and draw a state in the empty diagram area.
  4. Select the Default Connector icon
    and draw the connector from outside the state to the edge of the state.
  5. To complete the statechart, select the Transition icon and draw the line from one edge of the bottom of the state to the other edge.
  6. Type evNotify as the name for this transition.
  7. To complete the statechart, double-click the transition line to add the notify(); Action.
  8. Click OK.
  9. Click the tab for the object model diagram and note that a statechart icon is now displayed in the SDM class. The icon is circled in the following example:

Feedback