Presentation is loading. Please wait.

Presentation is loading. Please wait.

Similar presentations

Presentation on theme: ""— Presentation transcript:

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

72 UML Sequence Diagrams 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. CS 325 February 10, 2015 Page 72

73 UML Sequence Diagrams: Lifelines
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. CS 325 February 10, 2015 Page 73

74 UML Sequence Diagrams: Messages
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. CS 325 February 10, 2015 Page 74

75 UML Sequence Diagrams: Activation Bars
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. CS 325 February 10, 2015 Page 75

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

77 UML Sequence Diagrams: Synchronous Messages
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). CS 325 February 10, 2015 Page 77

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

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

80 UML Sequence Diagrams: Interaction Frames
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. CS 325 February 10, 2015 Page 80

81 Thermostat Controller Example
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). CS 325 February 10, 2015 Page 81

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

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

84 Thermostat Controller Example
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. CS 325 February 10, 2015 Page 84

85 UML Communication Diagrams
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. CS 325 February 10, 2015 Page 85

Download ppt ""

Similar presentations

Ads by Google