Académique Documents
Professionnel Documents
Culture Documents
INTERACTION DIAGRAMS
BY
SYED FEROZ ZAINVI
WRITING FROM:
HTTP://WWW.COMPUTER-SCIENCE-NOTES.BLOGSPOT.COM
Recap
OID Types:
Collaboration Diagram: Message oriented dynamic behavior
OBJECT ROLES
Sequence Diagram: Time oriented dynamic behavior
WHAT MESSAGE & WHEN
Collaboration Diagram
Contents
Actors: Invoke interaction-Keep at
periphery
Objects: Objectname:Classname
(classname unspecified, object
named/unnamed, only classname)
Links: Relationship, instance of
association-may be unspecified- veh
for messages
Messages: Communication-arrow
points towards target object-shown
with name, parmaters, sequence-
temporary: later mapped to operation
Sequence Diagram
Contents
Objects with lifeline
Actors
Messages with duration
No links
*
[condn]
Scripts: Textual
description for lifelines or
messages
Rules same as for
Collaborations Diagrams
Control Flow in Sequence Diagrams
Centralized Control Flow
Few objects steer the flow by
sending messages to, and
receiving messages from other
objects
These controlling objects decide
the order in which other objects
will be activated in the use case
Interaction among the rest of
the objects is very minor or does
not exist
FORK SHAPED
Control Flow in Sequence Diagrams
STAIR-WAY SHAPED
Centralized Vs Decentralized Control Flow
A decentralized structure is appropriate:
If the sub-event phases are tightly coupled. This
A centralized structure is
will be the case if the participating objects:
Form a part-of or consists-of hierarchy, such
appropriate:
as Country - State - City; If the order in which the
Form an information hierarchy, such as CEO -
Division Manager - Section Manager; sub-event phases will be
Represent a fixed chronological progression
(the sequence of sub-event phases will always performed is likely to
be performed in the same order), such as
Advertisement - Order - Invoice -Delivery -
change.
Payment; or
Form a conceptual inheritance hierarchy, such
If you expect to insert new
as Animal - Mammal - Cat.
If you want to encapsulate, and thereby make
sub-event phases.
abstractions of, functionality. This is good for If you want to keep parts
someone who always wants to use the whole
functionality, because the functionality can of the functionality
become unnecessarily hard to grasp if the
behavior structure is centralized. reusable as separate
pieces.
Similarities between Collaboration & Sequence Diagram
HTTP://WWW.CROSSROADSBYZAINVI.BLOGSPOT.COM