Download presentation
Published byTamsin Cooper Modified over 9 years ago
1
Zhang Shuang zhangs@swc.neu.edu.cn
Software Engineering Zhang Shuang 1
2
Zhang Shuang, zhangs@swc.neu.edu.cn
3. Dynamic Modeling Produce UML state diagram State, event, predicate distributed over state diagram UML “guards” are in brackets [ ] Initial state End state Zhang Shuang,
3
3. Dynamic Modeling State diagram is replenishment of class description. It depicts all the states that a class' instance may experience and the causing events. An event may be a message from another object, or meeting some conditions. An event may be an action which causing state change. The state's change is called transition.
4
Zhang Shuang, zhangs@swc.neu.edu.cn
3. Dynamic Modeling Not all classes need state diagram. Some classes have clear states changing according to conditions and events. Zhang Shuang,
5
Zhang Shuang, zhangs@swc.neu.edu.cn
3. Dynamic Modeling Exercise 1 Draw a UML state diagram to model the control program for a portable CD player. Include three states: stopped, playing, and paused. Also, include three events possible in any state: pause_is_pressed, stop_is_pressed, and play_is_pressed. Zhang Shuang,
6
Zhang Shuang, zhangs@swc.neu.edu.cn
3. Dynamic Modeling State Diagram for CD player paused Zhang Shuang,
7
Zhang Shuang, zhangs@swc.neu.edu.cn
3. Dynamic Modeling Exercise 2 Draw a UML state diagram to model the Library Mgmt. System for a book. Include three states: available, borrowed, and reserved. Also, include events possible in any state: borrow, return, reserve, cancel reservation, reservation times out and renew. Zhang Shuang,
8
3. Dynamic Modeling State Diagram for Book in Library Mgmt. Sys.
9
Zhang Shuang, zhangs@swc.neu.edu.cn
3. Dynamic Modeling Exercise Order in an eCommerce system An order goes through the states of placed, paid, shipped, arrived, closed. Zhang Shuang,
10
3. Dynamic Modeling
11
Zhang Shuang, zhangs@swc.neu.edu.cn
3. Dynamic Modeling Practice: get state diagram for class Order in eCommerce System. Zhang Shuang,
12
Thank You ! 12
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.