Professional Documents
Culture Documents
USE CASE
LECTURE 2
1
REQUIREMENT ENGINEERING
2
DESCRIBING SCENARIO
• A scenario is a scene that illustrates some interaction with a proposed
system.
• A scenario is a tool used during requirements analysis to describe a
specific use of a proposed system.
• Scenarios capture the system, as viewed from the outside, e.g., by a
user, using specific examples.
• Some organizations have complex documentation standards for
describing a scenario. At least, the description should include:
❑A statement of the purpose of the scenario
❑The individual user or transaction that is being followed through the
scenario
❑Assumptions about equipment or software
❑The steps of the scenario
3
EXAMPLE OF HOW TO DEVELOP A SCENARIO WITH
A CLIENT
11
USE CASE DIAGRAM
1- An actor:
Is someone (e.g. human beings) or something (e.g.
other objects or systems) that interact with the
system.
Is entity external to the system who participates in
the story of the use case (receive or input), such as a
person, computer system, or organization.
An actor has a unique name.
❖ In naming actors, choose names that describe the role,
not generic names, such as "user" or "client".
◼e.g. a library clerk, cashier, customer, Passenger,
GPS satellite, bank, customer department . 12
USE CASES FOR EXAM SYSTEM
13
Example – ATM banking system
14
USE CASE DIAGRAM
• Use cases are drawn as ellipses with the name of the use case
written inside the ellipse
• Use case name typically consists of an active verb and one or
more nouns that concisely describe the system function modelled
System name
Use case 1
Actor 1 Actor 2
Use case 2
15
Actor 3
USE CASE DIAGRAM
Actors are connected to the use case/s with which they
interact by a line, which represents the relationship
between the actor/s and the use case/s
One actor may be associated with one or more use cases
One use case may be associated with one or more actors
16
17
USE CASE BEHAVIOUR DESCRIPTION
18
TYPES OF USE CASE BEHAVIOUR
DESCRIPTION FORMAT
ACTOR ACTION
System Response
1. THIS USE CASE BEGINS WHEN A
CUSTOMER ARRIVES AT THE POST
CHECKOUT WITH ITEMS TO PURCHASE
3 4
5 6
7 8
25
RELATIONSHIPS BETWEEN USE CASES:
<<INCLUDES>>
26
The <<includes>> Relationship
<<includes>> relationship represents behavior that is
factored out of the use case. A use case uses another
use case (“functional decomposition”)
Used to indicate that one use case includes the
functionality of another use case.
A function in the original problem statement is too
complex to be solvable immediately
Describe the function as the aggregation of a set of
simpler functions. The associated use case is
decomposed into smaller use cases
A reusable use case (component) that is unconditionally
called into the execution of another use case (always
included in the process – like running BIOS in a system
boot).
27
Included Including
use case use case
THE <<INCLUDES>> RELATIONSHIP
• <<includes>> behavior is factored out for reuse, not because it is an
exception.
ManageIncident
<<include>>
28
RELATIONSHIPS BETWEEN USE CASES:
<<EXTENDS>>
29
The <<extends>> Relationship
Extended Extending
use case use case
Passenger
PurchaseTicket
<<extends>>
<<extends>>
<<extends>>
Cancel NoChange
31
THE <<EXTENDS>> RELATIONSHIP
• Use cases representing exceptional flows can extend more than one
use case.
• The direction of a <<extends>> relationship is to the extended use
case
• For example: the use case “ReportEmergency” is complete by itself
, but can be extended by the use case “Help” for a specific scenario
in which the user requires help
Help
FieldOfficer
f
<<extend>>
ReportEmergency
32
Class
registration
<<Extends>> <<Extends>> Registration
Student Clerk
Registration for
special class
Prereq courses
not completed
Student Billing
Bursar’s
office
Instructor
Use-Case Diagram
33