Software System EngineeringSlide 2Slide 3Interaction Diagrams (1)Interaction Diagrams (2)Uses of Interaction DiagramsContents of Interaction DiagramsDrawing Collaboration DiagramsCommon UsesSlide 10Slide 11Interaction Diagrams (3)Interaction Diagram: Example (1)Interaction Diagram: Example (2)Interaction Diagram: Example (3)Discussion Questions© M.E. Fayad 2000-2006SJSU -- CmpESoftware System Engineering Dr. M.E. Fayad, ProfessorComputer Engineering Department, Room #283I College of EngineeringSan José State UniversityOne Washington SquareSan José, CA 95192-0180 http://www.engr.sjsu.edu/~fayad© M.E. Fayad 2000-2006SJSU – CmpE M.E. Fayad L3-6c-S2 Interaction Diagrams2Lesson 3-6c:Interaction Diagrams© M.E. Fayad 2000-2006SJSU – CmpE M.E. Fayad L3-6c-S3 Interaction Diagrams Lesson ObjectivesObjectives3 Understand how to create interaction diagrams Learn the syntax of interaction diagrams Explore interaction diagrams’ examples© M.E. Fayad 2000-2006SJSU – CmpE M.E. Fayad L3-6c-S4 Interaction DiagramsAn interaction diagram shows an interaction, consisting of a set of objects and their relationships, including the messages that may be dispatched among them–Sequence diagram–Collaboration diagram4Interaction Diagrams (1)© M.E. Fayad 2000-2006SJSU – CmpE M.E. Fayad L3-6c-S5 Interaction DiagramsA sequence diagram emphasizes the time ordering of messagesA collaboration diagram emphasizes the structural organization of the objects that send and receive messages5Interaction Diagrams (2)© M.E. Fayad 2000-2006SJSU – CmpE M.E. Fayad L3-6c-S6 Interaction DiagramsTo visualize, specify, construct, and document the dynamics of a particular society of objectsTo model one particular flow of control of a use case6Uses of Interaction Diagrams© M.E. Fayad 2000-2006SJSU – CmpE M.E. Fayad L3-6c-S7 Interaction DiagramsObjectsLinksMessagesNotesConstraints7Contents of Interaction Diagrams© M.E. Fayad 2000-2006SJSU – CmpE M.E. Fayad L3-6c-S8 Interaction DiagramsPlace objects that participate in the interaction as the vertices in a graphRender the links that connect these objects as the arcs of this graphAdorn these links with the messages that objects send and receive8Drawing Collaboration Diagrams© M.E. Fayad 2000-2006SJSU – CmpE M.E. Fayad L3-6c-S9 Interaction DiagramsUse sequence diagrams to model flows of control by time ordering–Do a better job of visualizing simple iteration and branchingUse collaboration diagrams to model flows of control by organization–Do a better job of visualizing complex iteration and branching and of visualizing multiple concurrent flows of control9Common Uses© M.E. Fayad 2000-2006SJSU – CmpE M.E. Fayad L3-6c-S10 Interaction DiagramsA collaboration diagram displays object interactions organized around objects and their links to one another10Interaction Diagrams (1)© M.E. Fayad 2000-2006SJSU – CmpE M.E. Fayad L3-6c-S11 Interaction DiagramsDon’t show the lifeline of an object explicitly–Although one can show both create and destroy messagesDon’t show the focus of control explicitly–Although each message’s sequence number can indicate nesting11Interaction Diagrams (2)© M.E. Fayad 2000-2006SJSU – CmpE M.E. Fayad L3-6c-S12 Interaction DiagramsTwo features that distinguish them from sequence diagrams–Path•To indicate how one object is linked to another–Sequence number•To indicate the time order of a message12Interaction Diagrams (3)© M.E. Fayad 2000-2006SJSU – CmpE M.E. Fayad L3-6c-S13 Interaction Diagrams13Interaction Diagram: Example (1)© M.E. Fayad 2000-2006SJSU – CmpE M.E. Fayad L3-6c-S14 Interaction Diagrams14Interaction Diagram: Example (2)© M.E. Fayad 2000-2006SJSU – CmpE M.E. Fayad L3-6c-S15 Interaction Diagrams15Interaction Diagram: Example (3)© M.E. Fayad 2000-2006SJSU – CmpE M.E. Fayad L3-6c-S16 Interaction DiagramsT/Fa. Use collaboration diagrams to model flows of control by organizationb. A collaboration diagram displays object interactions organized around objects and their links to one another16 Discussion
View Full Document