Session 8 - Use Case Diagram
Session 8 - Use Case Diagram
2
June 21, 2024
Software Engineering
Use Case Diagrams
For example, a bank cardholder might need to use an ATM to get cash
out of their account.
3
June 21, 2024
Software Engineering
Use case diagrams describe what a system does
from the standpoint of an external observer.
4
June 21, 2024
Software Engineering
Use case diagrams are closely connected to scenarios.
5
June 21, 2024
Software Engineering
What Is A Use Case Scenario?
Software Engineering
The outcome is different,
depending on circumstances,
8
June 21, 2024
Software Engineering
One Scenario for Withdraw Use Case
9
June 21, 2024
Software Engineering
10
June 21, 2024
Software Engineering
11
June 21, 2024
Software Engineering
A use case is a summary of scenarios for a single task
or goal.
12
June 21, 2024
Software Engineering
Use Case diagram at a Glance
A standard form of use case diagram is defined in the Unified Modeling Language as shown in
the Use Case Diagram example below:
13
June 21, 2024
Software Engineering
An actor:
Characterises a role
A person, a system or
some external entity
Linked to one or more
system use cases 14
June 21, 2024
Software Engineering
Actors are simply roles that people or
objects play.
15
June 21, 2024
Software Engineering
Use Case:
System function
(process - automated or manual)
i.e. Do something
Software Engineering
Here is a scenario for a medical clinic.
yearly checkup.
17
June 21, 2024
Software Engineering
The picture below is a Make Appointment use case for the medical
clinic.
Software Engineering
The connection between actor and use case is a
communication association (or communication
for short).
19
June 21, 2024
Software Engineering
Actors are stick figures
20
June 21, 2024
Software Engineering
A Use Case is Started by an Actor
The actor starts the use case because it wants something from the system, so:
21
June 21, 2024
Software Engineering
The actor supplies the event that starts the use case
Software Engineering
A use case diagram is a
collection of:
23
June 21, 2024
Software Engineering
We've put Make Appointment as part of a diagram with four actors and four use
cases.
24
June 21, 2024
Software Engineering
Use case diagrams are helpful in three areas:
determining features
(requirements)
communicating with
clients
Software Engineering
determining features (requirements)
26
June 21, 2024
Software Engineering
communicating with clients
Software Engineering
generating test cases
Software Engineering
Digging Deeper: Use Case Diagrams
29
June 21, 2024
Software Engineering
This page covers the following UML™ use case features.
system
generalizations
boundaries
includes extensions
30
June 21, 2024
Software Engineering
Medical clinic diagram, expanded
The following use case diagram expands the original medical clinic diagram with
additional features.
31
June 21, 2024
Software Engineering
A system boundary rectangle separates the clinic system from the external actors.
System boundary
32
June 21, 2024
Software Engineering
A use case generalization shows that one use case is simply a special kind
of another.
Software Engineering
Include relationships factor use cases into additional
ones.
Includes are especially helpful when the same use case can be factored out of two
different use cases.
Use case 1
Common use
case
Use case 2
34
June 21, 2024
Software Engineering
include notation is a dotted line beginning at base use case ending
with an arrow pointing to the include use case.
Software Engineering
An extend relationship indicates that one use case is a variation of another.
Software Engineering
How to Identify Actor
The following questions can help you identify the actors of your system (Schneider
and Winters - 1998):
• Who uses the system?
• Who installs the system?
• Who starts up the system?
• Who maintains the system?
• Who shuts down the system?
• What other systems use this system?
• Who gets information from this system?
• Who provides information to the system?
• Does anything happen automatically at a present time?
37
June 21, 2024
Software Engineering
How to Identify Use Cases
The following questions can help you identify use cases, once your actors have
been identified (Schneider and Winters - 1998):
Software Engineering
How to draw a Use Case diagram?
Software Engineering
Use-Case
Examples
40
June 21, 2024
Software Engineering
41
June 21, 2024
Software Engineering
42
June 21, 2024
Software Engineering
43
June 21, 2024
Software Engineering
44
June 21, 2024
Software Engineering
45
June 21, 2024
Software Engineering
46
June 21, 2024
Software Engineering
47
June 21, 2024
Software Engineering
48
June 21, 2024
Software Engineering
Benefits of Use Case diagram?
Use case diagram is a powerful technique for the elicitation and documentation of black-box
functional requirements
Use cases are easy to understand and provide an excellent way for communicating with
customers and users as they are written in natural language.
Use cases can help manage the complexity of large projects by partitioning the problem into
major user features (i.e., use cases) and by specifying applications from the users'
perspective.
49
June 21, 2024
Software Engineering
Benefits of Use Case diagram?
A use case scenario, often represented by a sequence diagram, involves the collaboration of
multiple objects and classes, use cases help identify the messages (operations and the information
or data required - parameters) that glue the objects and classes together.
Use cases provide a good basis to link between the verification of the higher-level models (i.e.
interaction between actors and a set of collaborative objects), and subsequently, for the
validation of the functional requirements (i.e. blueprint of white-box test).
Use case driven approach provides a traceable links for project tracking in which the key
development activities such as the use cases implemented, tested, and delivered fulfilling the goals
and objectives from the user point of views.
50
June 21, 2024
Software Engineering
End of Chapter
51
June 21, 2024
Software Engineering