Download presentation
Presentation is loading. Please wait.
1
Lecture 5a: Sequence Interaction Diagrams CSE 111 Copyright W. Howden1
2
Where we are now Use Cases description of required system functionality System architecture overall picture of what system will look like Domain analysis basic concepts and relationships that will become foundational classes incipient transformation of functional use cases into object oriented design Copyright W. Howden2
3
What’s next? Determine the interactions between the actors and the system Determine the interactions between the subsystem components –defines the subsystem interfaces –we will use Sequence Interaction Diagrams Copyright W. Howden3
4
4 Dynamic(Behavioral) vs Static Models and Properties Dynamic –Describe interactions between entities –Sequence Interaction Diagrams –Collaboration Diagrams –Message Sequence Charts –State Charts Static –Describe structure of complex entities –Class Diagrams Domain Models Class Design –Entity-relationship models
5
Copyright W. Howden5 Sequence Diagrams - Notation Object boxes –actors, subsystems, class instances Life lines –vertical line extending down from object Messages –horizontal arrows from one life line to another –One object sends a message to another message
6
Sequence Diagrams - Meaning Each diagram describes a scenario, or what happens during a use of the system A system can be described by a collection of SI diagrams Copyright W. Howden6
7
7
8
Comments on Diagrams - 1 No two message arrows should be at the same horizontal level. The ordering down the page shows the time order If a message has a return, you do not show it as a solid back arrow. Either leave the arrow out, or show using a dashed message arrow (not used here) Copyright W. Howden8
9
Comments on Diagrams - 2 The boxes at the top stand for objects, not classes We can indicate which classes the objects come from, using the notation :GUI:DomainLogic:DataBase –This notation indicates an object from the GUI, Domain Logic and DataBase classes Copyright W. Howden9
10
Comments on Diagrams - 3 Boxes with top-right dog-ear can be used to insert explanatory notes in the SI diagram Little boxes in the middle of the life lines are drawn in by the graphics editor (e.g. MS Visio) can use them to indicate “focus of control”, which is discussed later Copyright W. Howden10
11
Copyright W. Howden11 Comments on Diagram - 4 This SI Diagram shows: –System/Actor interactions Interactions of users with system Leads to user interface design features –Subsystem interactions Requirements elaboration and design How subsystems interact with each other Leads to subsystem interface design features
12
Copyright W. Howden12 System/Actor Interactions Specifies the needed user interface forms –can be used to identify contents/capabilities of GUI Following example: includes use of “self- messages” notation –used to show an internal action in an object (it sends itself a message) e.g. the actions taken by the GUI in response to a user message
13
Copyright W. Howden13
14
Use Cases and Sequence Diagrams Sequence diagrams can be used for different aspects of a design –in CSE 111 project restricted to subsystem interactions caused by use case interactions Each use case may have one or more sequence interaction diagrams that describe possible scenarios of system usage Copyright W. Howden14
15
Copyright W. Howden15 Subsystem Interactions Show the messages that the subsystems send back and forth Should conform to layers architecture –“higher levels” send messages to “lower levels” but not vice versa Helps to define the subsystems interface details (what messages/methods the interface class must have, etc.)
16
Copyright W. Howden16
17
Comments on Diagram - 1 In the diagram we see the conditional notation –uses the notation “[cond]” which means that the message only occurs if the condition is satisfied –if only [cond] is present, and there is no [not(cond)] alternative in the diagram, it means this diagram only describes the scenario for the [cond] case Copyright W. Howden17
18
Comments on Diagrams - 2 In our diagram, there are three subsystems: GUI, DomainLogic, and DataBase Each subsystem is a collection of classes, but has a single interface class through which all communication is channeled The names of the interface classes are the same as the subsystem names Copyright W. Howden18
19
Comments on Diagrams - 3 We show, for example, the :DomainLogic object (an instance of the DomainLogic interface class) sending a message to :DataBase (an instance of the Domain Logic interface). The message will actually go to the DataBase interface, but it could come from class objects in the DomainLogic subsystem other than the interface class Copyright W. Howden19
20
Comments on Diagrams - 4 - So, is it Illegal/Incorrect? At this early stage, we have identified our subsystems We can represent the subsystems with a single interface class that has all the required logic, etc. As the design proceeds we will identify additional classes in the subsystems Copyright W. Howden20
21
Copyright W. Howden21 Some Additional Examples Get a Date Scenario Start up Scenario –Shows interactions with system Log On Scenario Exit/Log Off Scenario
22
22
23
Copyright W. Howden23
24
24
25
Copyright W. Howden25
26
Copyright W. Howden26 Additional Notation “Focus of Control” elongated box –Indicate when an object’s life line is “active” –Active sending a message waiting for a reply Notation for message iteration - *
27
Copyright W. Howden27
28
Copyright W. Howden28 Additional Concepts – Message Synchronization Different message arrow notation for –Synchronous: sender waits until receiver has processed message –Procedure call: receiver is ready to receive call, sender waits for return from call. A kind of synchronous –Asynchronous: sender sends message and then continues regardless of status of receiver –Balking: if receiver is not ready to receive message it is abandoned We will just use a single simple arrow
29
New Design Information Design details for subsystem interface classes Messages received by the DomainLogic and the DataBase interfaces will be implemented as methods in those interface classes Messages to GUI correspond to GUI input forms Copyright W. Howden29
30
CSE 111 Deliverables to Date Uses cases for application, all functionality; identification of uses cases and functionality to be done in phase 1 Domain model for phase 1 System model (three tier); consideration of use of callbacks for project Interaction sequence diagrams showing actor/system interactions and diagrams showing subsystem interactions (New) Copyright W. Howden30
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.