Presentation is loading. Please wait.

Presentation is loading. Please wait.

Zhang Shuang zhangs@swc.neu.edu.cn Software Engineering Zhang Shuang zhangs@swc.neu.edu.cn 1.

Similar presentations


Presentation on theme: "Zhang Shuang zhangs@swc.neu.edu.cn Software Engineering Zhang Shuang zhangs@swc.neu.edu.cn 1."— Presentation transcript:

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


Download ppt "Zhang Shuang zhangs@swc.neu.edu.cn Software Engineering Zhang Shuang zhangs@swc.neu.edu.cn 1."

Similar presentations


Ads by Google