INTERACTION DIAGRAMS INTERACTION DIAGRAMS Shows you stepbystep one

INTERACTION DIAGRAMS

INTERACTION DIAGRAMS � Shows you step−by−step, one of the flows through a use case: � what objects are needed for the flow, � what messages the objects send to each other, � what actor initiates the flow, and � what order the messages are sent. � Two types of Interaction Diagrams: � Sequence Diagram � Collaboration Diagram

INTERACTION DIAGRAM ELEMENTS � An object � is something that encapsulates information and behavior. � It's a term that represents some real−world thing (i. e. Flight no#101, Ticket, or Passenger) �A class � provides a blueprint for an object. � In other words, a class defines what information an object can hold and what behavior it can have. (i. e. Flight Class, Ticket Class, or Passenger Class).

WHERE DO I START � Find Objects � Find Classes � Add messages to the diagram

SEQUENCE DIAGRAM � An Interaction diagrams that are ordered by time. � Each use case will have a number of alternate flows. � Each Sequence diagram represents one of the flows through a use case. � The diagram is read from the top to the bottom.


ACTOR � An Actor models a type of role played by an entity that interacts with the subject

LIFELINE �A lifeline represents the life time of an object.

CALL MESSAGE �A message defines a particular communication between Lifelines of an Interaction.

RETURN MESSAGE � Return message is a kind of message that represents the pass of information back to the caller of a corresponded former message.

DESTROY MESSAGE � Destroy message is a kind of message that represents the request of destroying the lifecycle of Object lifeline.




COLLABORATION DIAGRAM

COLLABORATION DIAGRAM � Collaboration diagrams show exactly the same information as the Sequence diagrams. � However , Collaboration diagrams show this information in a different way and with a different purpose. � While Sequence diagrams are ordered by time, Collaboration diagrams focus more on the relationships between the objects.


- Slides: 18