0% found this document useful (0 votes)
14 views51 pages

Session 8 - Use Case Diagram

Uploaded by

Hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views51 pages

Session 8 - Use Case Diagram

Uploaded by

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

CHAPTER 6

USE CASE DIAGRAMS

Dr. Ali RAAD


Use Case Diagrams

A use case describes how a user uses a


system to accomplish a particular goal.

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.

Its as simple as that.

3
June 21, 2024

Software Engineering
Use case diagrams describe what a system does
from the standpoint of an external observer.

The emphasis is on what a system


does rather than how.

4
June 21, 2024

Software Engineering
Use case diagrams are closely connected to scenarios.

A scenario is an example of what happens when someone


interacts with the system.

5
June 21, 2024

Software Engineering
What Is A Use Case Scenario?

When a cardholder tries to withdraw cash from an ATM, it doesn’t


always necessarily turn out the same way.

 Sometimes he gets his money.


 Other times he might have insufficient funds.
 Or the ATM may be out of cash.

These are all examples of use case scenarios.


6
June 21, 2024

Software Engineering
The outcome is different,
depending on circumstances,

but they all relate to the same functional goal:


that is, they’re all triggered by the same need -

and all have the same starting point.

June 21, 2024


7
Software Engineering
Use Case Scenarios

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.

An actor is who or what initiates the events


involved in that task.

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:

Is always outside the system being modeled

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)

Named by verb + Noun (or Noun Phrase).

i.e. Do something

Each Actor must be linked to a use case, while


some use cases may not be linked to actors.
16
June 21, 2024

Software Engineering
Here is a scenario for a medical clinic.

A patient calls the clinic to make an appointment for a


"

yearly checkup.

The receptionist finds the nearest empty time slot in the


appointment book and schedules the appointment for
that time slot. "

17
June 21, 2024

Software Engineering
The picture below is a Make Appointment use case for the medical
clinic.

The actor is a Patient.


18
June 21, 2024

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

Use cases are ovals

Communications are lines that link actors to use cases

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:

Name the use case in terms of the outcome of value to


the actor

Begin the use case name


with an active verb

21
June 21, 2024

Software Engineering
The actor supplies the event that starts the use case

The actor is the source of the incoming event that is the


first line in the use case

The arrow indicates that the actor starts the interaction


between the actor and the use case

This actor is then the 'active' or 'primary' actor for


the use case
June 21, 2024
22

Software Engineering
A use case diagram is a
collection of:

actors use cases their communications

23
June 21, 2024

Software Engineering
We've put Make Appointment as part of a diagram with four actors and four use
cases.

Notice that a single use case can have multiple actors.

24
June 21, 2024

Software Engineering
Use case diagrams are helpful in three areas:

determining features
(requirements)

communicating with
clients

generating test cases


25
June 21, 2024

Software Engineering
determining features (requirements)

New use cases often generate new


requirements as the system is analyzed
and the design takes shape.

26
June 21, 2024

Software Engineering
communicating with clients

Their notational simplicity makes


use case diagrams a good way for
developers to communicate with
clients.
27
June 21, 2024

Software Engineering
generating test cases

The collection of scenarios for a


use case may suggest a suite of
test cases for those scenarios.
28
June 21, 2024

Software Engineering
Digging Deeper: Use Case Diagrams

Use case diagrams give an outsider's


view of a system.

Every use case diagram has actors, use


cases, and communications.

A simple use case diagram can be expanded with


additional features to display more information.

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.

Parent use case

A child can be substituted for its parent whenever necessary.

Generalization appears as a line with a triangular arrow head toward


the parent use case.
33
June 21, 2024

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.

The dotted line is labeled


<<include>> 35
June 21, 2024

Software Engineering
An extend relationship indicates that one use case is a variation of another.

Extend notation is a dotted line, labeled <<extend>>, and with an


arrow towards the base case.

The extension point, which determines when the extended case is


appropriate,
June 21, 2024
is written inside the base case. 36

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):

• What functions will the actor want from the system?


• Does the system store information? What actors will create, read, update
or delete this information?
• Does the system need to notify an actor about chances in the internal
state?
• Are there any external events the system must know about? What actor
informs the system ofJunethose
21, 2024
events? 38

Software Engineering
How to draw a Use Case diagram?

A Use case model can be developed by following the steps below.

1. Identify the Actors (role of users) of the system.


2. For each category of users, identify all roles played by the users relevant
to the system.
3. Identify what are the users required the system to be performed to
achieve these goals.
4. Create use cases for every goal.
5. Structure the use cases.
6. Prioritize, review, estimate and validate the users.
39
June 21, 2024

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy