Analiza și Modelarea Sistemelor Software - Lab 2

Traian Șerbănuță

2025

Agenda

UML behavioral diagrams

Sequence diagrams

Behavior diagrams

Purpose

Elements and relationships

Example

Elements of a behavioral diagram of a vehicle reservation system

Types of behavioral diagrams

Sequence Diagrams

How –and in what order– a group of objects works together.

Also known as

  • event diagrams
  • event scenarios

Used by both software developers and business professionals, to

  • understand new requirements
  • document existing processes

Activity diagrams

Model

  • behaviors of a system

  • how these are related

    (in the overall flow of the system).

Activities can be:

  • sequential,
  • branched
  • concurrent.

Use case diagrams

Model users interacting with the system

Timing diagrams

Powerful tools for making a system as efficient as possible.

Communication diagrams

Model how components communicate and interact

  • like sequence diagrams
  • but focus on interaction
  • program communication

Useful for

  • businesses
  • organization
  • engineers

Interaction Overview diagrams

Activity diagram where nodes are interaction diagrams

Diagrams used as nodes

  • sequence
  • communication
  • interaction overview
  • timing

State Diagram

Useful for representing state machines.

Sequence Diagrams

Sequence Diagrams

How –and in what order– a group of objects works together.

Also known as

  • event diagrams
  • event scenarios

Used by both software developers and business professionals, to

  • understand new requirements
  • document existing processes

Use cases for sequence diagrams

Usage scenario

Draw a diagram of how your system could be used.

Method logic

Explore the logic of any function, procedure, or complex process.

Service logic

Viewing a service as a high-level method used by different clients.

Sequence diagram symbols and components

Object symbol
Object symbol
Lifeline symbol
Lifeline symbol
Event
Event
Actor
Actor
Alternative
Alternative
Loop
Loop
Symbol Name Description
Synchronous message sender waits for response before it continues
Asynchronous message don’t require response before continuing. Only the call should be included in the diagram
Create message (asyncronously) creates a new object
Reply message replies to calls
Delete message destroys an object

Sequence diagram example

Exercise

Model (using a sequence diagram) the possible scenarios of a Customer purchasing a Product using an online shopping system:

A Customer browses/searches the Catalog, adds and/or removes Products into a Cart (updating the stocks), then goes to a Checkout page which gets its credentials from a Login (which verifies/requires that the user is logged in), allows it to select payment/shipping info, and returns to the customer an order number to allow tracking the order.