Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 325: Software Engineering February 10, 2015 Object Interaction Modeling UML Sequence Diagrams Thermostat Controller Example UML Communication Diagrams.

Similar presentations


Presentation on theme: "CS 325: Software Engineering February 10, 2015 Object Interaction Modeling UML Sequence Diagrams Thermostat Controller Example UML Communication Diagrams."— Presentation transcript:

1

2 CS 325: Software Engineering February 10, 2015 Object Interaction Modeling UML Sequence Diagrams Thermostat Controller Example UML Communication Diagrams

3 UML Sequence Diagrams CS 325 February 10, 2015 Page 72 Sequence Diagrams illustrate the sequence of interactions between objects (or participants) in a software system. This diagram shows interactions between a customer and two software systems, using two form interfaces and an “order” object.

4 UML Sequence Diagrams: Lifelines CS 325 February 10, 2015 Page 73 Each object in a Sequence Diagram has a lifeline indicating its overall activity as the diagrammed interactions progress. Notice that the Order object is created during one interactive sequence, so its lifeline begins lower in the diagram.

5 UML Sequence Diagrams: Messages CS 325 February 10, 2015 Page 74 Interaction between objects is represented in a Sequence Diagram by horizontal arrows representing procedure calls. The initial message coming from outside of the system is called a “found message”, coming from an undetermined source.

6 UML Sequence Diagrams: Activation Bars CS 325 February 10, 2015 Page 75 Vertical activation bars are used to indicate that processes are being performed in response to messages. While activation bars are optional in UML 2, they tend to clarify the behavior taking place within a system.

7 UML Sequence Diagrams: Return Messages CS 325 February 10, 2015 Page 76 Return messages may be explicitly represented within a Sequence Diagram. Dashed backward arrows represent explicit return messages; missing backward arrows indicate implicit returns.

8 UML Sequence Diagrams: Synchronous Messages CS 325 February 10, 2015 Page 77 Some messages require responses before a process can proceed. One reason to show explicit responses is to emphasize which messages are synchronous (filled triangle arrowhead).

9 UML Sequence Diagrams: Asynchronous Messages CS 325 February 10, 2015 Page 78 Processes may proceed without awaiting responses for some messages. Asynchronous messages are represented with stick arrowheads (usually with implicit return messages).

10 UML Sequence Diagrams: Subprocesses CS 325 February 10, 2015 Page 79 Nested activation bars represent subprocesses within a Sequence Diagram. Nesting of processes is often rendered implicitly, in order to avoid overcomplicating the Sequence Diagram.

11 UML Sequence Diagrams: Interaction Frames CS 325 February 10, 2015 Page 80 Loops and conditionals may be represented in Sequence Diagrams via interaction frames. This interaction frame represents a loop that restricts the number of times a user may check his balance on an ATM.

12 Thermostat Controller Example CS 325 February 10, 2015 Page 81 Consider the embedded software for an industrial air conditioning unit. The controller sets the unit’s thermostat low when cool air is in greater demand (e.g., weekdays when the factory is in production) and high when it’s in less demand (during the evenings and overnight on weekdays, and at all times during weekends).

13 Thermostat Controller Example CS 325 February 10, 2015 Page 82 The factory manager may set the following parameters for the controller: HighTemp: Goal temperature when light (or no) cooling is needed WeekendDays: Days when thermostat is set to HighTemp all day LowTemp: Goal temperature when heavy cooling is needed PeakTimes: Ordered pair of times between which thermostat is set to LowTemp on non-WeekendDays Mode: Controller state (possibilities: StayLow, StayHigh, Normal)

14 Thermostat Controller Example CS 325 February 10, 2015 Page 83 Four main objects interact in this system: the controller, the thermostat, the clock, and the time period.

15 Thermostat Controller Example CS 325 February 10, 2015 Page 84 The primary Sequence Diagram for the thermostat controller involves adjusting to a new setting. Note that this action occurs only when the controller is in Normal mode at a time at the beginning or ending of the PeakTimes interval.

16 UML Communication Diagrams CS 325 February 10, 2015 Page 85 Communication Diagrams basically illustrate the same information as Sequence Diagrams, but with an emphasis on the inter-object relationships rather than the order in which messages are processed.


Download ppt "CS 325: Software Engineering February 10, 2015 Object Interaction Modeling UML Sequence Diagrams Thermostat Controller Example UML Communication Diagrams."

Similar presentations


Ads by Google