Interaction Diagrams - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Interaction Diagrams

Description:

An interaction diagram shows an interaction, consisting of a set of objects and ... Object lifeline ... Don't show the lifeline of an object explicitly ... – PowerPoint PPT presentation

Number of Views:31
Avg rating:3.0/5.0
Slides: 22
Provided by: terryqu
Category:

less

Transcript and Presenter's Notes

Title: Interaction Diagrams


1
Interaction Diagrams
  • Keng Siau
  • University of Nebraska-Lincoln

2
Interaction Diagrams
  • An 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
  • Communication diagram

3
Interaction Diagrams
  • A sequence diagram emphasizes the time ordering
    of messages
  • A communication diagram emphasizes the structural
    organization of the objects that send and receive
    messages

4
Uses of Interaction Diagrams
  • To visualize, specify, construct, and document
    the dynamics of a particular society of objects
  • To model one particular flow of control of a use
    case

5
Contents of Interaction Diagrams
  • Objects
  • Links
  • Messages
  • Notes
  • Constraints

6
Drawing Sequence Diagrams
  • Place objects that participate in the interaction
    at the top of the diagram, across the X-axis
  • Place the object that initiates the interaction
    at the left, and increasingly more subordinate
    objects to the right
  • Place messages the objects send and receive along
    the Y-axis, in order of increasing time from top
    to bottom

7
Drawing Communication Diagrams
  • Place objects that participate in the interaction
    as the vertices in a graph
  • Render the links that connect these objects as
    the arcs of this graph
  • Adorn these links with the messages that objects
    send and receive

8
Common Uses
  • Use sequence diagrams to model flows of control
    by time ordering
  • Do a better job of visualizing simple iteration
    and branching
  • Use communication 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 control

9
Sequence Diagrams
  • Sequence diagrams have two features
  • Object lifeline
  • Vertical dashed line that represents the
    existence of an object over a period of time
  • Focus of control
  • A tall, thin rectangle that shows the period of
    time during which an object is performing an
    action, either directly or through a subordinate
    procedure

10
Syntax for Sequence Diagram
11
Example of Sequence Diagram
12
Example of Sequence Diagram
13
Example of Sequence Diagram
14
Example of Sequence Diagram
15
Example of Sequence Diagram
16
Communication Diagram
  • A communication diagram displays object
    interactions organized around objects and their
    links to one another

17
Communication Diagrams
  • Dont show the lifeline of an object explicitly
  • Although one can show both create and destroy
    messages
  • Dont show the focus of control explicitly
  • Although each messages sequence number can
    indicate nesting

18
Communication Diagrams
  • Two 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 message

19
Communication Diagram
20
Communication Diagram
21
Communication Diagram
Write a Comment
User Comments (0)
About PowerShow.com