0% found this document useful (0 votes)
66 views21 pages

Uml-Use Case and Activity Diagrams: Cuong V. Nguyen - Se 2020 1

The document discusses use case diagrams and activity diagrams in UML. It provides an overview of UML and defines use cases and use case diagrams, describing their purpose and notations. It also defines activity diagrams, describing their purpose as depicting system workflows and notations such as states, flows, decisions, forks, and joins. It provides an example diagram and compares use cases and activity diagrams.

Uploaded by

Nguyệt Quế
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views21 pages

Uml-Use Case and Activity Diagrams: Cuong V. Nguyen - Se 2020 1

The document discusses use case diagrams and activity diagrams in UML. It provides an overview of UML and defines use cases and use case diagrams, describing their purpose and notations. It also defines activity diagrams, describing their purpose as depicting system workflows and notations such as states, flows, decisions, forks, and joins. It provides an example diagram and compares use cases and activity diagrams.

Uploaded by

Nguyệt Quế
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

UML- USE CASE AND ACTIVITY

DIAGRAMS
CUONG V. NGUYEN - SE 2020 1
AGENDA
▪ UML
▪ Use case diagram
▪ Activity diagram
▪ Example and differences

CUONG V. NGUYEN - SE 2020 2


UML
▪ The Unified Modeling Language (UML) is a general-purpose modeling
language in the field of software engineering that is intended to provide a
standard way to visualize the design of a system.
▪ UML is a way of visualizing a software program using a collection of
diagrams.
▪ Today, UML is accepted by the Object Management Group (OMG) as the
standard for modeling software development.

CUONG V. NGUYEN - SE 2020 3


UML DIAGRAMS

CUONG V. NGUYEN - SE 2020 4


WHICH UML DIAGRAMS ARE USED?
Usage from books, tools, courses and tutorials
100%
90%
80%
70%
60%
widely used, if ≥ 60% 50%
scarcely used if it ≤ 40% 40%
30%
20%
10%
0%

* Reference - What are the used UML diagrams? A Preliminary Survey, Gianna Reggio, Maurizio Leotta, Filippo Ricca, Diego Clerissi
CUONG V. NGUYEN - SE 2020 5
USE CASES
▪ Use-cases are a scenario based technique in the UML which identify the
actors in an interaction and which describe the interaction itself.
▪ Use cases specify the expected behavior (what), and not the exact method
of making it happen (how)
▪ A set of use cases should describe all possible interactions with the system.
▪ A use-case shall be something a user needs to achieve/fulfil his or her goal
from a high level.

CUONG V. NGUYEN - SE 2020 6


PURPOSE OF USE CASE DIAGRAM
▪ Often developed in the early stage of development to:
▪ Specify the context of a system
▪ Capture the requirements of a system
▪ Validate a systems architecture
▪ Drive implementation and generate test cases
▪ Developed by analysts together with domain experts

CUONG V. NGUYEN - SE 2020 7


REPRESENTATION
▪ Use case: a function or behavior of
a system performed which yields an
observable result
▪ Actor: users or other systems that
may interact with a system
▪ Boundary of system: The system
boundary is the logical separation
represents a part or entire system.
▪ For large and complex systems, each
module may be the system
boundary.

CUONG V. NGUYEN - SE 2020 8


SIMPLICITY

CUONG V. NGUYEN - SE 2020 9


USE CASE RELATIONSHIP
▪ Extend: indicates that an use case may be
extended to be used also with the base use case

▪ Include: an use case is depicted as using the


functionality of another use case, the relationship
between the use cases is named as include

▪ An include/extend relationship is depicted with a


directed arrow having a dotted line.

CUONG V. NGUYEN - SE 2020 10


USE CASE DIAGRAM IN PRACTICE
▪ Use questions such as “who uses the system?”, “who operates/maintains the
system?” to identify the actors.
▪ Always structure and organize the use case diagram from the perspective of
actors.
▪ Use cases should be simple with high abstraction view. Don’t worry about the
details.
▪ Use case diagrams are abstractions of functionality aspect, the focus should
be on the "what" and not the "how".

CUONG V. NGUYEN - SE 2020 11


ACTIVITY DIAGRAM
▪ An activity diagram is a behavioral diagram: it depicts the behavior of a
system
▪ Are graphical representations of workflows of stepwise activities and
actions
▪ Describe dynamic aspects of the system with choices and conditions
▪ An activity diagram focuses on condition of flow and the sequence in which it
happens.

CUONG V. NGUYEN - SE 2020 12


ACTIVITY DIAGRAM NOTATIONS
▪ Initial State – The starting state before an activity takes place is depicted
using the initial state.
A process can have only one initial state

Final State:
The final point, this stops all control flows and object flows in an activity

CUONG V. NGUYEN - SE 2020 13


ACTIVITY STATE
▪ Action or Activity State – An activity represents execution of an action on
objects or by objects. We represent an activity using a rectangle with
rounded corners. Basically any action or event that takes place is
represented using an activity.

CUONG V. NGUYEN - SE 2020 14


ACTION FLOW
▪ Action Flow or Control flows – used to show the transition from one activity
state to another.
▪ An activity state can have multiple incoming and outgoing action flows.
▪ If there is a constraint for the transition, it an also be mentioned on the
arrow.

CUONG V. NGUYEN - SE 2020 15


DECISION NODE
▪ Decision node – When there’s a choice to make before deciding the flow of
control, we use the decision node.

CUONG V. NGUYEN - SE 2020 16


FORK
▪ Fork – Fork nodes are used to describe/split one into parallel activities
▪ Both branches need to be executed concurrently and no decision is made.

CUONG V. NGUYEN - SE 2020 17


JOIN
▪ Join – Join nodes are used to support concurrent activities converging into
one.

CUONG V. NGUYEN - SE 2020 18


EXAMPLE

CUONG V. NGUYEN - SE 2020 19


SWIM LANE
▪ Swimlanes – Swimlanes are just way of grouping related activities in one
cluster such as row or colulmn.
▪ Swimlanes can be vertical and horizontal.
▪ Swimlanes are used to add modularity to the activity diagram.

CUONG V. NGUYEN - SE 2020 21


USE CASE VS ACTIVITY DIAGRAM
▪ An activity diagram is used to ▪ Use Case only represents the
model the workflow depicting functionality, what the system does
conditions, constraints, sequential
▪ Use case shows ‘What’
and concurrent activities
▪ an activity diagram shows ‘How’ ▪ Use cases only describe
abstraction. They can be used to
▪ An activity diagram can be used to show a high level functionalities,
illustrate a business process (high can not be used to describe
level implementation) to a stand implementation.
alone algorithm (ground level
implementation)

CUONG V. NGUYEN - SE 2020 23

You might also like