Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 18

Use Case Diagrams

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 11


Slide
Use Cases


What is a Use Case
 Illustrates the activities that are
performed by the users of the system
 A sequence of actions a system performs that
yields a valuable result for a particular actor.

Use Cases describe scenarios that show the


interaction between users of the system (the
actor) and the system itself.

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 22


Slide
Use Case Analysis


What is an Actor?
• A user or outside system that interacts
with the system being designed in order
to obtain some value from that
interaction

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 33


Slide
Actors


An Actor (NOT a part of the system)is
outside or external the system.

It can be a:
• Human
• Peripheral device (hardware)
• External system or subsystem
• Time or time-based event

Represented by stick figure
©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 44
Slide
Use Cases


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.

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 55


Slide
Use Case Componentss

The use case has three components.


- The use case task referred to as the use case that
represents a feature needed in a software system.


- The actor(s) who trigger the use case to activate.


- The communication line to show how the actors
communicate with the use case.

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 66


Slide
Use Cases

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. "


We want to write a use case for this scenario.

Remember: A use case is a summary of
scenarios for a single task or goal.

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 77


Slide
Use Cases


Step 1 Identify the actors

As we read the scenario, define those people or
systems that are going to interact with the
scenario.


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. "

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 88


Slide
Use Cases


So as we read our scenario, who is the
actor????


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. "


The actor is a Patient.

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 99


Slide
Use Cases


The use case is a summary of scenarios for a
single task or goal.


So What is the Use Case????


The Use Case is Make Appointment.

It is a use case for the medical clinic.

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide


Slide 10
10
Use Cases

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

The actor is a Patient. The connection between actor and use case
is a communication association (or communication for short).

tick figures. Use cases are ovals. Communications are lines that link actors

Actors are stick figures. Use cases are ovals. Communications are
lines that link actors to use cases.
©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide
Slide 11
11
Use Case

Each use case in a use case diagram
describes one and only one function in
which users interact with the system

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide


Slide 12
12
Use Case

Labelled using a descriptive verb
phrase

Represented by an oval

Make
Appointment

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide


Slide 13
13
Use Case - Actor

Labelled using a descriptive noun

Represented by a stick character

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide


Slide 14
14
Use Case - Relationships

Relationships
• Represent communication between actor and
use case
• Depicted by line
• Also called association relationship

Make
Appointment

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide


Slide 15
15
Use Case - Relationships

Boundary
• A boundary rectangle is placed around the
perimeter of the system to show how the actors
communicate with the system.

Make
Appointment

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide


Slide 16
16
Use-Case Diagram

A use case diagram is a collection of actors, use cases, and their


communications.
©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide
Slide 17
17
Use Case Diagram Examples

- An automated teller machine (ATM) is a banking
subsystem (subject) that provides bank customers with
access to financial transactions in a public space without
the need for a cashier, clerk, or bank teller.

• Customer (actor) uses bank ATM to Check Balances of his/her bank


accounts, Deposit Funds, Withdraw Cash and/or Transfer Funds (use cases)
• ATM Technician provides Maintenance and Repairs. 
• All these use cases also involve Bank actor

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide


Slide 18
18

You might also like