quiz image

UML Interaction Diagrams

RichTourmaline9881 avatar
RichTourmaline9881
·
·
Download

Start Quiz

Study Flashcards

30 Questions

What does a collaboration diagram resemble?

A flowchart

What is a Collaboration?

A collection of named objects and actors with links connecting them

What emerges from the collaboration between objects?

Desirable functionalities

How do objects collaborate with each other?

By communicating with each other

What is the first step in creating a collaboration diagram?

Identify behavior whose realization and implementation is specified

What is the purpose of a specification level collaboration diagram?

To summarize the alternative scenarios in the instance level sequence diagrams

What is represented by rectangles with naming labels in a collaboration diagram?

Objects

How many major components does a collaboration diagram have?

Four

What is the primary purpose of UML interaction diagrams?

To model the dynamic aspect of a system

What type of diagrams are used to describe interactions among classes or objects in terms of an exchange of messages over time?

Sequence diagrams

What is the primary focus of sequence diagrams?

Validating various runtime scenarios

What do sequence diagrams usually capture?

The interaction that takes place in a collaboration

What is the purpose of an actor in a sequence diagram?

To represent roles played by human users or external systems

What type of diagrams are used to visualize the dynamic aspect of a system?

UML interaction diagrams

What is the primary purpose of collaboration diagrams?

To visualize the structural organization of objects and their interactions

What is the purpose of modeling the dynamic aspect of a system?

To understand the communication and collaboration between objects or classes

What is the primary benefit of using sequence diagrams?

Predicting how a system will behave

What is depicted using a solid line between two elements in a collaboration diagram?

A link between an actor and an object

What is the role of an actor in a collaboration diagram?

To initiate the entire use case

What is shown as a labeled arrow placed near a link in a collaboration diagram?

A message between objects

What is the main difference between sequence diagrams and collaboration diagrams?

The focus on sequence of messages versus structural organization

Why are both sequence and collaboration diagrams often required?

Because a single figure is not sufficient in describing the behavior of a system

What does a lifeline represent in a sequence diagram?

An individual participant in the interaction

What does the top of a thin rectangle on a lifeline represent?

The initiation time of an operation

What is the purpose of a call message in a sequence diagram?

To represent the invocation of an operation of the target lifeline

What is the difference between a self message and a recursive message?

A self message is used for invoking an operation of the same lifeline, while a recursive message is used for invoking an operation of the same lifeline, with a target point to an activation on top of the activation where the message was invoked from

What is the purpose of a create message in a sequence diagram?

To represent the instantiation of a lifeline

What is the purpose of a duration message in a sequence diagram?

To represent the distance between two time instants for a message invocation

What is the purpose of a note in a sequence diagram?

To attach various remarks to elements

What is another name for a collaboration diagram?

Communication diagram

Study Notes

Interaction Diagrams

  • Interaction diagrams represent interaction (communication, collaboration) between objects/classes and visualize the dynamic aspect of a system.
  • UML interaction diagrams consist of sequence diagrams and communication diagrams.

Sequence Diagrams

  • Sequence diagrams describe interactions among classes/objects in terms of an exchange of messages over time.
  • They are also called event diagrams and are useful for visualizing and validating various runtime scenarios.
  • Sequence diagrams capture:
    • Interaction that takes place in a collaboration that either realizes a use case or an operation.
    • High-level interactions between users of the system and the system, between the system and other systems, or between subsystems.

Sequence Diagram Notations

  • Actor: represents a type of role played by an entity that interacts with the subject.
  • Lifeline: represents an individual participant in the Interaction.
  • Activation: a thin rectangle on a lifeline represents the period during which an element is performing an operation.
  • Call Message: represents an invocation of operation of target lifeline.
  • Return Message: represents the pass of information back to the caller of a corresponded former message.
  • Self Message: represents the invocation of message of the same lifeline.
  • Recursive Message: represents the invocation of message of the same lifeline, with the target pointing to an activation on top of the activation where the message was invoked from.
  • Create Message: represents the instantiation of (target) lifeline.
  • Destroy Message: represents the request of destroying the lifecycle of target lifeline.
  • Duration Message: shows the distance between two time instants for a message invocation.
  • Note: gives the ability to attach various remarks to elements, carrying no semantic force but containing useful information for a modeler.

Collaboration Diagrams

  • Collaboration diagrams, also known as communication diagrams, illustrate the relationships and interactions among software objects.
  • A collaboration is a collection of named objects and actors with links connecting them, which collaborate in performing some task.
  • Collaboration diagrams show:
    • Roles, functionality, and behavior of individual objects.
    • Overall operation of the system in real-time.

Steps for Creating Collaboration Diagrams

  • Identify behavior whose realization and implementation is specified.
  • Identify structural elements (class roles, objects, subsystems) necessary to carry out the functionality of the collaboration.
  • Decide on the context of interaction: system, subsystem, use case, and operation.
  • Model structural relationships between elements to produce a diagram showing the context of the interaction.
  • Consider alternative scenarios that may be required.
  • Draw instance-level collaboration diagrams, if required.
  • Optionally draw a specification-level collaboration diagram to summarize alternative scenarios in instance-level sequence diagrams.

Collaboration Diagram Example

  • A collaboration diagram illustrates the relationships and interactions among software objects.

Collaboration Diagram Notations

  • Objects: shown as rectangles with naming labels inside (object name: class name).
  • Actors: instances that invoke the interaction in the diagram, with a name and a role.
  • Links: connect objects with actors, depicted as solid lines between two elements.
  • Messages between objects: shown as labeled arrows placed near a link, conveying information about the activity and including sequence numbers.

Learn about interaction diagrams, sequence diagrams, and communication diagrams in UML, used to visualize and validate system interactions. Understand how they represent communication and collaboration between objects/classes.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

UML Diagrams Tutorial
10 questions

UML Diagrams Tutorial

InnocuousFlerovium avatar
InnocuousFlerovium
UML System Sequence Diagrams
10 questions
Use Quizgecko on...
Browser
Browser