Use Cases
Use Cases
Use Cases
10-1
Use Cases
Use case is a depiction of a system’s
behavior or functionality under various
conditions as the system responds to
requests from users.
Actor is an external entity that interacts
with the system.
2
Use Cases (Cont.)
FIGURE 7-26
A use case diagram for a university registration system
3
A Use Case Example of Student
Enrollment (Figure 10.6)
10-4
Use Cases (Cont.)
Most actors represent user roles, but actors can
also be external systems.
An actor is a role, not a specific user; one user
may play many roles, and an actor may
represent many users.
A use case model consists of actors and use
cases.
5
Use Cases diagrams
Use case diagram: a picture showing
system behavior along with the key actors
that interact with the system
Abstract use case is when a use case is
initiated by another use case.
A use case represents completely
functionality.
6
Definitions and Symbols
Use Case
Actor
Boundary
Connection
<<include>> Include relationship
Extend relationship <<extend>>
7
Actor
Divided into two groups
Primary actors:
Supply data or receive information from the system
Provide details on what the use case should do
Supporting actors:
Help to keep the system running or provide help
The people who run the help desk, the analysts,
programmers, and so on
2-8
A Use Case Always Provides Three
Things
An actor that initiates an event
The event that triggers a use case
The use case that performs the actions
triggered by the event
2-9
Use Case Relations
Behavioral relationships
Communicates
Used to connect an actor to a use case
Includes
Describes the situation in which a use case
contains behavior that is common to more
than one use case
2-10
Use Case Relations
Behavioral relationships (continued)
Extends
Describes the situation in which one use
case possesses the behavior that allows the
new case to handle a variation or exception
from the basic use case
Generalizes
Implies that one thing is more typical than
the other thing
2-11
Four Types Of Behavioral Relationships And
The Lines Used To Diagram Each
(Figure 2.13)
2-12
Some components of use case diagrams showing actors,
use cases, and relationships for a student enrollment
example (Figure 2.14)
2-13
Scope
System scope defines its boundaries:
What is in or outside the system
Project has a budget that helps to define scope
Project has a start and an end time
Actors are always outside of scope
Communication lines are the boundaries and
define the scope
2-14
Developing Use Case Diagrams
Review the business specifications and identify the actors
involved
May use agile stories
Identify the high-level events and develop the primary use
cases that describe those events and how the actors
initiate them
Review each primary use case to determine the possible
variations of flow through the use case
The context-level data flow diagram could act as a starting
point for creating a use case
2-15
A Use Case Diagram Representing a System Used
to Plan a Conference (Figure 2.15 )
2-16
Developing the Use Case
Scenarios
The description of the use case
Three main areas:
Use case identifiers and initiators
Steps performed
Conditions, assumptions, and questions
2-17
Definitions and Symbols (Cont.)
System boundary includes all the
relevant use cases.
A boundary is the dividing line between the
system and its environment.
Use cases are within the boundary.
Actors are outside of the boundary.
Represented as a box
18
Definitions and Symbols (Cont.)
Connection is an association between an
actor and a use case.
Depicts a usage relationship
Connection does not indicate data flow
Actors are connected to use cases with lines.
Use cases are connected to each other with
arrows.
Definitions and Symbols (Cont.)
FIGURE 7-27
A use case diagram featuring an include relationship
Written Use Cases
Document containing detailed
specifications for a use case
Contents can be written as simple text or
in a specified format
Step-by-step description of what must
occur in a successful use case
Level of Use Case
Refers to degree of detail in the use case
description
10-30
11/18/13 32
Building Use Cases
.
Process of Developing Use
Cases
Identify the major use cases
Identify the major steps within each use
case
Identify elements within steps
Confirm the use case
Cycle through the above steps iteratively
5 - 34
Step 1:
Identify the major use cases
Start a use case form for Ask who, what, and where about the tasks and their
each use case inputs and outputs:
If more than nine, group What are the major tasks performed?
into packages What triggers this task? What tells you to perform this
task?
What information/forms/reports do you need to perform
this task?
Who gives you these information/forms/reports?
What information/forms/reports does this produce and
where do they go?
5 - 35
Step 2: Identify the major steps within
each use case
For each use case, fill Ask how about each use case:
in the major steps How do you produce this report?
needed to process the
inputs and produce the How do you change the information on the report?
outputs How do you process forms?
What tools do you use to do this step (e.g., on
paper, by email, by phone)?
Step 3:
Identify elements within steps
.
Step 4:
Confirm the use case
•For each use case, •Ask the user to execute the process using the
validate that it is correct written steps in the use case – that is, have the
and complete user role-play the use case
.
Process Modeling using Data Flow
Diagrams
39
Process Modeling using Data Flow
Diagrams
40
Summary
In chapter you learned how to:
Explain use cases and use case
diagrams.
Explain how they can be used to model
system functionality.
Discuss process modeling with use cases
for electronic commerce application.
Object-Oriented Analysis and Design:
Use Cases
A Sample Case Study
Web transactions
Deposit
Teller Withdraw
Transfer Customer
Deposit
Teller Withdraw
Transfer Customer
Primary actors
go on the left
A Sample Use Case Diagram
In-Branch Services
Deposit
Teller Withdraw
Transfer Customer
Secondary
actors on the
right
A Sample Use Case Diagram
In-Branch Services
Deposit
Teller Withdraw
Transfer Customer