Module4 - Object Oriented Analysis Dynamic Model
Module4 - Object Oriented Analysis Dynamic Model
Software Engineering
Computer Science
Academic Year 2023/2024
1
Contents
1. Introduction
• What will we learn
2. Use Cases in UML
• Use Case Diagram
• Actors
• Extensions
3. Activity Diagrams
4. Sequence Diagrams
1. Introduction
What will we learn?
• Dynamic or Behavioral things are the dynamic parts of UML models. These are the verbs
of a model, representing behavior over time and space.
• The dynamic model describes these aspects of the system that can change over time. Both
Intra-object: change of state of an object that receives a given event, and Inter-object:
show how objects interact with each other.
• What are we going to see in this section? Modelling Elements! Such as:
ü Textual description of use cases (seen in Module 3) and Use Cases Diagrams.
ü Activity diagram.
ü System Sequence diagram.
• OOA/D uses the Analysis done in UML use cases and diagrams to help developers
understand the requirements and to design software. OOAD uses UML diagrams to
represent the different components and interactions of a software system.
1. Introduction
What will we learn?
1. Introduction
What will we learn?
OOA/D
Activity Dynamic
Diagrams Model
OOA/D
Behavior
Diagrams
1. Introduction
• Book References
• UML provides notations for actors, use cases and relationships between them.
• Use case diagrams has four key elements: Actors, Use Cases, System and
Associations Use Case Diagram.
2. Use Cases in UML
UML Use Case Diagram
• Activity diagrams are the only UML diagram in the process view of your system’s
Model (as described in Module 3, section 3).
3. Activity Diagrams
• Activity diagrams are flowcharts that show the flow of activities performed by the
system. Can be helpful to capture and discuss complex use cases scenarios.
• Example: activity diagram for an order management system:
3. Activity Diagrams
• Eight key elements:
ü Start,
ü Activity
ü Flow
ü Fork
ü Join
ü Decision
ü Merge
ü and End
• Fork split the incoming flow in two or more concurrent flows. Join bar allows two or
more parallel flows to be joined into a single outgoing flow and synchronise all
incoming flows.
3. Activity Diagrams
• Example: user login
system for an App.
3. Activity Diagrams
• Steps to draw an activity diagram:
Stage 1 Stage 4
Stage 2 Stage 3
Identify the Apply
Identify the Identify
initial stage appropiate
intermediate conditions or
and the final notations and
activities constraints
stage symbols
3. Activity Diagrams
• Swim-lanes (also called
partitions) in activity diagrams
split the diagram horizontally or
vertically.
• Each row/column is assigned to
an actor.
• All actions in a row/column are
performed by the corresponding
actor.
3. Activity Diagrams
• Example: modeling the Process
Sale use case with an activity
diagram.
3. Activity Diagrams
• Example: a data flow view for a
Process Sale scenario using an
activity diagram with several
actors.
• In data flow views, we use UML
datastore nodes.
3. Activity Diagrams
• Example: an activity diagram with UML software design https://sparxsystems.com/
https://youtu.be/KzB66CNnpzg?si=FEpt894EkzzfaCQL
Contents
1. Introduction
• What will we learn
2. Use Cases in UML
• Use Case Diagram
• Actors
• Extensions
3. Activity Diagrams
4. Sequence Diagrams
4. Sequence Diagrams
• Sequence diagrams are one of the most widely use UML diagrams.
• They allow a temporal (dynamic, evolution over time) representation of
interactions between two or more entities within a scenario.
• Captures the exchanges messages between classes and actors and the timeline of
events. These diagrams focus on showing detailed interactions, such as which
objects are involved in an interaction, which methods are invoked, and the
sequence of events.
• Sequence, and also communication diagrams are UML diagrams that can also
model the dynamic behavior. Sequence diagrams are an important member of the
UML group known as interaction diagrams that model important runtime
interactions between the parts of the system. They work alongside communication
diagrams and timing diagrams.
4. Sequence Diagrams
• Use cases allow the model to describe what the system must do; clases (in the
next Module 5) allow your model to describe the different types of parts that
make up your system’s structure. There’s one piece that’s missing: with use cases
and classes alone, you can’t yet model how the system is actually going to do its
job. This is where interaction diagrams (and sequence diagrams) come into play.
• Sequence diagrams are all about capturing the order of interactions between
parts of your system. Using a sequence diagram, you can describe which
interactions will be triggered when a particular use case is executed and in what
order those interactions will occur. Sequence diagrams show plenty of other
information about an interaction, but their forté is the simple and effective way in
which they communicate the order of events within an interaction.
• Sequence diagrams are the only UML diagram in the logical view of the Model
(as described in Module 3, section 3).
4. Sequence Diagrams
• Two read directions
ü Horizontally : Arrows indicate
direction of the message.
ü Vertically : Chronological order of
the messages.
• Elements of a sequence diagram:
ü Participants
ü Lifeline
ü Interaction messages
ü Activation or execution
specification
4. Sequence Diagrams
Arrow with dashed line Return message symbol Shows the reply messages
4. Sequence Diagrams
• You can find a good step-by-step guide of sequence diagrams, with many practical
examples:
https://creately.com/guides/sequence-diagram-tutorial/
2. Use Cases in UML
https://youtu.be/pCK6prSq8aw