Download presentation
Presentation is loading. Please wait.
Published bySylvia James Modified over 9 years ago
1
Statechart diagrams Przemysław Kostyra Jakub Rypina
2
Basic data State Chart diagrams Help the developer better understand functionalities or business flows. Used to depict the behavior of a system
3
When to use Use state diagrams to demonstrate the behavior of an object through many use cases of the system. Only use state diagrams for classes where it is necessary to understand the behavior of the object through the entire system. Not all classes will require a state diagram and state diagrams are not useful for describing the collaboration of all objects in a use case. State diagrams are other combined with other diagrams such as interaction diagrams and activity diagrams.
4
Symbols – part I State typeNotation simple sequential composite state initial state final state concurrent composite state
5
Symbols – part II State typeNotation junction state history state sub state submachine reference state H include S S
6
Basic symbol State Activity
7
External transition Event Guard Action
8
Other transitions event [guard] /action state state 1state 2 [guard] /action internal transition self transition completion transition event [guard] /action
9
Login into online banking system
10
A seminar during registration
11
Seminar with a sub-state
12
Top-level state machine diagram
13
Concurrent processes in ATM ATM ready to operate Cash disposal do/issue money do/give card back division into concurent processes Synchronization of processes
14
Task I A light switch have two states: on and off. A light switch only has one possible event: the switch gets flipped. We start from off position.
15
Task II Your assistant only has two states of being: happy and sad. Further suppose that your assistant is basically cheerful and starts out happy. Also suppose that your assistant can only respond to two events: getting coffee (which makes her happy) and getting punched in the nose (which, needless to say, makes her sad).
16
Task III This assistant also responds to the arrival of hot milk, as well as to the arrival of coffee and to being punched in the nose. This assistant starts out happy and sleepy, and only awakes up when coffee arrives, or by being punched in the nose but he is sad after being punched. She also gets sleepy and happy each time hot milk shows up.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.