Presentation is loading. Please wait.

Presentation is loading. Please wait.

11 Software Engineering Dr. K. T. Tsang Lecture 9 Advance State Modeling

Similar presentations


Presentation on theme: "11 Software Engineering Dr. K. T. Tsang Lecture 9 Advance State Modeling"— Presentation transcript:

1 11 Software Engineering Dr. K. T. Tsang Lecture 9 Advance State Modeling http://www.uic.edu.hk/~kentsang/SWE/SWE.htm

2 2 Sub-state diagram & submachine Complex state diagram can be simplified by using a high-level diagram with sub- diagrams expanding certain states. A submachine is a state diagram that may be invoked as part of another state diagram. The UML notation for a submachine is a state name followed by a colon and the submachine name.

3 3 Example: submachine Fig.6.2 p.111 B&R

4 4 Example: submachine -2 Fig.6.3 p.112 B&R

5 5 Nested states States with common features and shared behaviors can be grouped together to form a macro-state. This will help to simplify the original complex state diagram. The constituent states of the macro-state is called nested states.

6 6 State diagrams for a phone line Fig.5.8 p.97 (no nested states)

7 7 Fig.6.4 p.113 State diagrams for a phone line (with nested states)

8 8 Signal (class) generalization Signals can be organized into a hierarchy in inheritance relationship. Hierarchy for keyboard signals -- Fig. 6.6 p.115

9 9

10 10 Concurrency In general, objects are autonomous entities that can act & change state independently. Sometimes, they need not be completely independent and may subject to shared constraints that cause some correspondence among their state changes.

11 11 Aggregation concurrency Example: Car – fig.6.7 p.116 State diagram for aggregate object is a collection for its parts. The aggregate state comprises of (“and” related) one state from each part. Transition in one part may depend on the states in other parts. In the car example, the transition of ignition from “off” to “starting” depends on the transmission in “neutral” state.

12 12 Example: Car – fig.6.7 p.116

13 13 Concurrent activities within an object Some object may have to perform 2 or more activities concurrently. These activities may not be synchronized but they must be completed before the object can progress to its next state. Fig. 6.9 p.117 CashDispenser example

14 14 Fig. 6.9 p.117 CashDispenser example

15 15 Summary – OO modeling methodologies Class model (static view of classes) –Classes & Associations –Class diagram, Object diagram State model (dynamic view of a class, life of objects) –States, events, signals, activities, & transitions –State diagram Interaction model (dynamic view across classes) –Sequence diagram (time) –Collaboration diagram (players) –Activity diagram (processes)

16 16 Development stages Requirement Analysis Design –System (architecture) –Class Implementation Testing Deployment, maintenance OO Methodologies

17 17 Reading for this lecture Chapter 6 Blaha & Rumbaugh


Download ppt "11 Software Engineering Dr. K. T. Tsang Lecture 9 Advance State Modeling"

Similar presentations


Ads by Google