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

Use Case Diagrams

UML-Behavioral Diagram
UML Diagrams

Use Case

Collaboratio
UML Class
diagram
n diagram

sequence
diagram
object
diagram
state
activity transition
diagram diagram
System Requirements
The Requirements specification must provide sufficient information
to enable the system to be constructed “successfully.”

Functional requirements

What the system must do (tasks)

Non-Functional Requirements

Eg constraints, such as hardware to be used,

Eg interface, documentation, training, management standards to be used.


The difficulty with requirements
System Requirements are normally written in English

According to the Oxford English Dictionary, the 500 words used most in the English
language each have an average of 23 different meanings.

Anti-nuclear protestors released live cockroaches inside the


White House Friday, and these were arrested when they left and
blocked a security gate.
From a British Airways Memorandum, quoted in Pilot
Magazine, December 1996:

Now… syntax is okay BUT U cant get the


sense out of it….can u???

The Landing Pilot is the Non-Handling Pilot until the decision altitude call, when the
Handling Non-Landing Pilot hands the handling to the Non-Handling Landing Pilot,
unless the latter "calls go around," in which case the Handling Non-Landing Pilot
continues handling and the Non-Handling Landing Pilot continues non-handling until the
next call of "land" or "go around" as appropriate.

In view of recent confusions over these rules, it was deemed necessary to restate them
clearly.
Now, whats wrong with these statements?

“The system shall list all the details of the members”.

Instructions to make tea

Fill kettle with water

Put tea bag in cup

Pour water from kettle into cup

Add milk &/or sugar (to taste)

Drink
As you already know
Complete

Unambiguous

Correct ( does what the user wants)

…. Whatever that is.


Check-List of Fuzzy requirements
prepared by MITRE corporation in 1988

Incomplete
Incomplete lists
lists ending
ending with
with "etc.,"
"etc.," "and/or,“.
"and/or,“.

Vague
Vague words
words and
and phrases
phrases such
such as
as "generally,"
"generally," "normally,"
"normally," "to
"to the
the greatest
greatest extent,"
extent," and
and
"where
"where practicable.“
practicable.“

Imprecise
Imprecise verbs
verbs such
such as
as "supported,"
"supported," "handled,"
"handled," "processed,"
"processed," or
or "rejected.“
"rejected.“

Implied
Implied certainty,
certainty, flagged
flagged by
by words
words such
such as
as "always,"
"always," "never,"
"never," "all,"
"all," or
or "every.“
"every.“

Passive
Passive voice,
voice, such
such as
as "the
"the counter
counter is
is set."
set." (By
(By whom
whom or
or what?)
what?)

Every
Every pronoun,
pronoun, particularly
particularly "it"
"it" or
or "its."
"its." Each
Each should
should have
have an
an explicit
explicit and
and unmistakable
unmistakable
reference.
reference.

Comparatives,
Comparatives, such
such as
as "earliest,"
"earliest," "latest,"
"latest," "highest."
"highest." Words
Words ending
ending in
in "or"
"or" or
or "est"
"est"
should
should be
be suspect.
suspect.
Check-List of Fuzzy requirements

Words and phrases whose meaning can be disputed between developer and customer,
such as instantaneous, simultaneous, achievable, minimum,

Contractually troublesome phrases:

"Design goal." The developer will spend money and other resources with no
guarantee of goal accomplishment.

"To the extent practicable." A decision in the eyes of the developer.

"Where applicable." There are no criteria for judgment.

"Shall be considered." The developer will think about.

"A minimum of X." The developer will provide exactly X.


Use Case-definition

a diagram that shows a set of use cases, actors and their relationships.

use cases represent system functionality, the requirements of the system from users’
perspective.
Notations
Use case

a description of a set of sequences of actions, including variants,


that system performs, which yields an observable value to an
actor.

Actor

People or system that provide or receive information from the


system; they are among the stake holders of the system

Includes

specifies that the source use case explicitly incorporates the


behavior of another use case. at a location specified by the
source.

Extends

specifies that the target use case extends the behavior of the
source.
Sample Use Case
Login
<<includes>>

Apply course
<<extends>>

View course
particulars
Actors
Could be human beings, other systems, timers and
clocks or other hardware devices.

Actors that stimulate the system and are the


initiators of the event are called primary actors
(active). Actors that only receive stimuli from the
system are called secondary actors (passive).
Actors
Who or what will be interested in
the system?

who or what will want to change


the data in the system?

who or what will want to interface


with the system?

who or what will want to interface


with the system?
Guidelines and Cautions
Use cases should begin with a verb. i.e. generate report. use cases should not be open
ended i.e. Register, it should rather be Register new student.

Avoid showing communication between actors.

Actors should be named as singular. i.e. student and not students. Also no names should
be used i.e. John, sam etc.

Do not show behavior in a use case diagram. Instead only depict system functionality.

Use case diagrams do not show sequence.


Include and Extend

The use of include and extend is discouraged simply because they add unnecessary
complexity to a Use Case Diagram.

since the primary purpose of use case diagram is to show user centered functionality the
precedence of use case takes little importance.
Draw a use case diagram?

In order to generate an invoice clerk must login. if a clerk is a first time user, one must
have themselves registered. there should be an option for the user to register on self with
in the login page. any user can use the system to view products online.

the option of log in is also provided when a user views products online.
The use case diagram
Login

Register User

View Products

User
Clerk
Generate Report
Hotel Management System
• Guests can reserve room in the hotel in advance or can reserve rooms on spot
depending on the availability of the rooms. The operator would enter data
pertaining to guests such as their arrival time, advance paid, and approx: duration
of stay and type of room required e.g. ac, non ac, deluxe, single or double. The
computer should register this data and depending on the availability of a suitable
room, the computer should provisionally a lot a room number to the guests. And
assign a unique token number to him or her. if the guests can not be
accommodated the computer generates an apology message.

The hotel catering services manager would input the quantity and type of food
items as and when consumed by the guests along with the token num of the
guests and the corresponding data and time. You can assume that different food
items have different code numbers and hence the catering services manager need
not enter the full name of different food items.

When a customer prepares to check out the hotel automation software should
generate the entire bill for the customer and the balance amount payable by him.

You might also like