Presentation is loading. Please wait.

Presentation is loading. Please wait.

UML: State Chart Diagrams

Similar presentations


Presentation on theme: "UML: State Chart Diagrams"— Presentation transcript:

1 UML: State Chart Diagrams
Sabbir Muhammad Saleh SAD ::: Fall ::: 2015

2 Statechart Diagrams difference between Statechart diagrams and Activity diagrams: Statechart diagrams are used to represent a single object and how its behavior causes it to change state Activity diagrams are used to model how different areas of work behave with each other and interaction

3 Statechart Diagrams: Components
a statechart diagram is composed by three components: - state - transitions - events

4 Statechart Diagrams: What’s “State”
state is defined as a snapshot or a milestone of an object’s behavior at a particular point in time on Computer booting processing can be in the following states: idle Shutting down off

5 Statechart Diagrams: Components – State
there are three separate notations for states in the statechart diagram: State State Start State End State

6 Statechart Diagrams: Components – State
a statechart diagram can include zero or more start states a statechart diagram can include more than one end states

7 Statechart Diagrams: Components – Transitions
transitions are used to show flow from one state to another State A State B

8 Statechart Diagrams: Components – Decision Points
decision points make the diagram more visually appealing by grouping transitions State A State B State C

9 Statechart Diagrams: Components – Synchronization
synchronization bars are used to show where states need to catch up with or wait up for others State A State B

10 Statechart Diagrams: Components – Actions and Events
actions and events are used to describe how states are reached, what happen when they are reached, and what happen when they are exited

11 Statechart Diagrams: Components – Actions and Events
events are indicated directly on the path of a transition from a state to another state Reset Deleted Cancel Data Entered Clean Dirty Continue Saved New

12 Statechart Diagrams: Components – Actions and Events
an action shows what behavior happens when an event occurs, there are five basic action types: - entry (action that occurs when state has been entered) - exit (action that occurs when state is being abandoned) - do (action that occurs when state is being occupied) - include (invokes a submachine) - event (used to specify the action that occurs when a specific event is fired)

13 Statechart Diagrams: Components – Actions and Events
Exit / Reset Deleted Cancel / EmptyData() Data Entered / RecordData() Clean Dirty Continue / SaveData() Saved Exit / Reset

14 Statechart Diagrams: Components – SubStates
used to model hierarchical states Event A [condition 1] Event A [condition 2] Event A State A State A State 1 State 2

15 Statechart Diagrams: Components – Composite States
used to model hierarchical states State B State A State 1 State 2

16 Statechart Diagrams: how to build models
there are five steps - identify the entities (objects or use cases) that need to be further detailed - identify the start and end states for each entity - determine the events relating to each entity - create the statechart diagram beginning with the start event - create composite states where necessary


Download ppt "UML: State Chart Diagrams"

Similar presentations


Ads by Google