Docsity

Object Interactions: Understanding through Sequence and Collaboration Diagrams, Slides of Object Oriented Analysis and Design

Partial preview of the text

Download Object Interactions: Understanding through Sequence and Collaboration Diagrams and more Slides Object Oriented Analysis and Design in PDF only on Docsity!

Interaction Diagrams

 show how objects interact with one another

 UML supports two types of interaction

diagrams

 Sequence diagrams

 Collaboration diagrams

Sequence Diagram(make a phone call)

Caller Phone Recipient

Picks up

Dial tone

Dial

Ring notification Ring

Picks up

Hello

Sequence Diagrams – Object Life Spans

 Creation

 Create message

 Object life starts at that point

 Activation

 Symbolized by rectangular stripes

 Place on the lifeline where object

is activated.

 Rectangle also denotes when

object is deactivated.

 Deletion

 Placing an ‘X’ on lifeline

 Object’s life ends at that point

Activation bar

A

B

Create

X

Deletion

Return

Lifeline

Sequence Diagram

User (^) Catalog (^) Reservations

1: look up () 2: title data () 3: [not available] reserve title ()

4 : title returned ()

5: hold title () 5 : title available ()

6 : borrow title ()

6 : remove reservation ()

  • Sequence diagrams demonstrate the behavior of objects in a use case by describing the objects and the messages they pass.
  • The horizontal dimension shows the objects participating in the interaction.
  • The vertical arrangement of messages indicates their order.
  • The labels may contain the seq. # to indicate concurrency.

Message