Chapter 10
Chapter 10
LEARNING GOALS
have seen in the previous chapters how system requirements specifications ate
Weexpanded from a fuzzily stated user requirements to a set of document low
diagrams, data flow diagrams, process specifications and decision tables. This set of
methods together is known as structured systems analysis and design. Another method
called object oriented systems analysis and design has also become popular during the last
few years. There are some advantages in using object oriented methods. However, the
tools used in structured methods, namely,data flow diagrams, documents flow diagrams,
decision tables are all useful in designing information systems. Use case method was
proposed by Jacobson [33] in the 90s as one of the tools useful in object oriented systems
analysis and design primarily to specify users' requirements. He developed a
diagramming method to develop use cases. The method was adopted by several designers
and modified based on their experience of using it in many large software design projects.
Atextual method of writing use cases describing the behaviour of asystem was proposed
by Cockburn [17] in early 2000. It will be described in this chapter along with use case
diagrams.
Simply stated a use case specifies in detail the behaviour of a system being developed to
meet a set of goals. We will first explain some terms used in writing use cases. This is
136
Use Cose Method 137
Used in literature. terminology
met by the system. the
accepted
to be
lt should with
Every use case has atitle. The
BiIthe goal
customer. The System we are concerned use isan called
actiontheverbsconesuchof as:
a use case.
rties whointerac with the system and are interested in its success are called the Receive
All the persons or
system.
give an
requirement statement
5.1 which we reproduce below for
S e c t i o
ready reference.
n
requirements. "Our
in,
they are
1
' s e r ' s a n d
it
is
suppled deficiencies in delivery and whether
to the delivery schedule as per the order. The
items received at the
a r e
a l s o
n o t
adhered
vendor
for physical inspection. The physical inspection consists
are sent
of
the quantities stated in the delivery note agree with the physical count,
e c e i v i n go f f i c e
the
wvhether
in placing cleared
togude
us
inspection
office are taken into the
inventory by the stores office which keeps a
and quantity available of each item. Customers send requisitions
stocked
bytheofitems
stores fulfill the requests based on availability and updates the ledger.
ledger
The
not able to meet some of our customers requests. We would like to
stores.
the
to we are
C u r r e n t l y ,
would also like to keep track of unfulfilled requests and meet them when items
We
islow. store.
Currently, we. are not able to pay our vendors promptly due to delays in
reach
the
order reachingour accounts office. We would like to rectify this. We wouldalso
payment
customers promptly
andI keep track of customers' payments.
our
like to
bilIl
10.1 in which there is a block labeled receiving office. We will
We refer to Figure
a use caSe corresponding to the receiving office.
develop first the behaviour of the receiving office software. The
of this use case is
The scope
of the system are the receiving
office clerk, purchase office, vendor and
the receiving office clerk. We will not be concerned
stakeholders
inspection
office.. The primary actor is
actors in this case.
with secondary
delivered by vendors
Use Case 1: Receive items
Receiving office clerk (ROC).
Primary actor:
items received.
Scope: Software which records
Purchase office, Inspection office.
Stake holders: Vendor, Receiving office,
Intomuhor Systerrs
138 Anossond Design of
Vendor
Deilvery ncte
Rejected
Rejected items Disrscarcy tes
Qoods rote
advice ote
Purchase
order
Items
Payment to vendor aCceptsd
Vendor
advice ote
invoice
Accounts office
Items taken in stock
Stores oftics
note-Pay vendor
psath
eptions
delivered by vendor not found in items
ordered database., Action?
in delivery note greater than that ordered.
Items
Action?
2 in delivery note less than that ordered. Action?
ltems
3
in delivery note received on a date outside specified
4
Items
5
should be noted from the above
mUmber
of
points
example. They are:
A The requirements specification is structured in aform which is readable by any
user.
much more detal than users fuzzily stated requirements.
tclearly statesthe assumptions made, i.e., items are
witha delivery
note to the Receiving office and that delivered physically along
the clerk is to acknowledge
with areceipt in case of success.
4 Whenthere are exceptions there are question marks. In other words what the clerk
is supposed to do in such cases is not clearly specified in the requirements
statement.
We develop below a use case corresponding ordering items from vendor (Figure 10.2).
Figure 10.2 Document flow diagram for ordering goods from vendor.
Informotion Systems
140 Analysis and Design of
from vendor
Use Case 2: Order items clerk(s)].
Purchase officer [Actual data entry by
Primary actor:
Scope: Order processing software.
Accounts officer, Vendor.
Goal: holders: Stores
Generate officer,
purchase order and sendto vendor. Store it in outstanding ieems ordereA
Stake
database.
Preconditions
which has item id, name
request received from stores office and
I. An
to
order
be ordered
tolerance (if any) by which
datedelivery
and in item is needed. The order request
shouldor
date. The order maybe a reorder advice
quanty
2. purchase
Purchase requisition.
office already has negotiated prices for common items. 1t is stored in
Exceptions
1. Request from stores incomplete (no item id). Action?
2. No vendor found for item ordered in the vendor item database. Action?
3. Vendor(s) return order as they have no stock or unable to supply item on tte
price has to be revised. Action?
4. Does purchase office request quotes from other vendors for exception?
Use Cose Method 141
gives in reasonable detail the behaviour expected
t h eu s e c a s e
hrrethat
from the
There are four exceptions which need clarification before
process,
the
developed. Use case often specify so called
office
Hnhase be minimum guarantees. These
whether allthe ctake holders interests are protected. In the above use case we can
C a n
N e 0
minimal guarantee as "If purchase office order process is unsuccessful for some
database will remain unchanged. Attempt at ordering
orders
along with reason why it tailed. No other database in the system accessiblewill
outstanding
to
be disturbed".
will|
willnowgive four more use cases corresponding to the document flow
h o l d e r s
diagrams
H i g u r e1 0 . 1 .
Inspection
of items sent by Receiving Office
Case.
3:
lse Inspection office staff (10S).
actor
Inspection Software.
P a i n a r v
hliters:
Receiving office, Stores office, Purchase office.
Sale Inspect actual item received with item received note. Find discrepancies (if any)
purchase office. Send accepted items to store.
report to
Pr-onditions:
nd Items received note has all requisite fields filled (order no., item id, item
q u a n t i t y ,
vendor id, vendor name and address, date delivered), Delivered items
ame,
from
ROC with relevant note.
Main Success S c e n a r i o
receives items with items received note from receiving office staff,(Physical
nG arrive with accompanying physical slip and also electronic record of the
physical slip).
2 10Sinspects items with note for quantity and quality. Quality OK and quantity
also OK.
lf checks successful sends items to store along with items received and accepted
note.
! lf checks not successful sends rejected note with rejected items to Purchase office.
5, The partial accepted note sent to stores office along with accepted itemns.
Exceptions
1lems delivered by vendor without corresponding delivery note. Action?
2 limost items pass quality and few rejected. Action? (Is serial no. 5 given in success
Scenario OK?)
. Iexcess items come and pass quality inspection what to do with excess?
4 If items found lesser than that written in delivery note. Action?
We see that there are anumber of exceptions in which action taken is not specified. They
ae to be specified for the use case to be completed.
Ne will now develop the use case of stores otfice (Pigure 10.1)
142 Analysis and Design of Information Systems
Payment advice
Bill or debit note
Issue note
Items issued
holders:
Customers, Accounts office, Purchase office.
Stake
Goal: Issue items requisitioned to customers. In case items not available notify customer
purchase
department. If issued notify accounts to debit customer's account.
and
Pre-conditions: Items requisitioned note has full details on item (customer id, item code,
item n a m e , quantity). Customer has budget allocation for requisition.
Main Success S c e n a r i o
1 Stores office receives requisition and finds it complete. Requested itemn available
in store. Issue item.
2. Intimate accounts office to debit customer's account by (item quantity x cost per
item).
Exceptions
1. Quantity requisitioned not available in store. Action ? (Partial issue or no issue)
2. Insufficient credit in customer's account. Action?
3. Item requisitioned not normally stored by the [Link] it add it to its normal
holding?
In Use Case 5 we have limited the scope to only issuing items to customers. We have not
nciuded automatic recorder if the quantity remaining after issue is found below a reorder
eve. Normally stores would intimate purchase to initiate a purchase order in such a
Situation. We will now develop ause case for that situation (Figure 10.3).
Use Case 6:
Stores requests Purchase office to replenish stock in store
Primary actor: Stores Officer (SO).
Scope: Software to
initiate automatic reorder process to purchase items.
Stake holders:
Stores officer, Purchase officer.
lnformation Systems
144 Analysis and Design of
reaches alevel below aspecified recorder
Goals: When an item in store
amount to be
office is requested to replenish stock. The ordered (1.e., \evel urha
quantity) is intimated by stores
officer or found in the stores
Main Success Scenario
database. optimal
When quantity of itemin stores database Sspecified reorder level,
office with following data (item id, item name, quantity to be request sent to
is stored in log file of requests sent. The actual purchase is
reordered). This
(ordering items from vendors). according to nfor nath,
Use.
Exceptions
1. Arequisition generated is already in the log file of
particularly if the order is for alarge quantity or there is items
along orodered.
date of first requisition? delay ironAcinnthe
The use case given above has only two stake holders and this is
be linked to Use Case 2. The next Use Case we will consider is very simple
goods purchased and taken into stock. In other words, paymentspayment by and is h
which passed inspection. This Use Case corresponds to documentmade onlaccount s ton
are
y for
Figure 10.1 and data flow diagram of Figure 10.4. We will first considerflow diagamitems
the accounts office pays vendor for items which passed inspection and the case
by the stores office. taken into whetstocke
Use Case 7: Accounts department pays vendors
Primary actor: Accounts Officer (AO).
Scope: Software to pay vendors for goods taken into stock.
Stake holders: Stores office, Purchase office, Vendor.
Goals: When items supplied by a vendor taken into
should send pay order (or cheque) to vendor alongstock by stores office, accounts o
reconcile payment. with vendor invoice referencs
Pre-conditions: Item takern into stock note
id, item name, cost per item, quantity takenreceived
in
from stores containing (order no. tem
with data (order no., vendor id, vendor stock, vendor id). Vendor invoice database
name, vendor address, item id, item name
quantity supplied, cost per item, amount payable) accessible
to accounts office.
Main Success Scenario
1. Accounts office receives item
taken into stock intimation from
2. Accounts office calculates stores office.
amount payable and creates pay order with
vendor id, vendor name, vendor address, (order t.
vendor invoice id, quantity accepted, item id, item name, quantity involk
cheque favouring vendor. It mails amount payable). Accounts ofhce prut
address. Alternately, accounts officecheque along with pay order to specihedvendor
bank account along with pay electronically transfers the amount to ve s
3. AO intimates order.
purchase
invoice reference. office on payment by sending order with
copy of Pay
4. Payment data stored in
paid database.
Use Cose Method 145
Eceptions
Stores,office
intimation
corrupted /not received by A0.
oftice
intimation has quantity accepted not equal to quantity specified as
1 vendor invoice. Action?
supplied in
S t o r e s
a d d r e s s
or bank account details has changed since supply., How does AO
kV
neon
w da
obr o u tt h i s 2
earlier
that there are two possible situations when items are issued to customer.
stated
in Case 5in which the "customer" is a part of an organization and there
We
isas
money ransaction. We will consider another case in which the organization
given
distributorwhobuys items
ini bulk from vendors and distributes it to customers who
r e c e i v e d
Figure
10.3 and data flow diagram of Figure 10.4.
of
dliagram
Payments
Orders
Vendor accounts
SO data
(customer id, Customer name and
AOreceives from
1. supplied, cost/item, date).
2. AO creates bill (customer id, name, amount billed date due) using addres , quan
3. AOchecks in its database amount due from customer If (amount
bill to SO for onward
billed) < allowed
credit limit) it sends
rheanst uS iun
database.
amount due
updates its customer
from all customers
Each day AO checks amount received with
4. subtracts amount
received from amount
dues database and outstani
issues receipt to customer forthe amount received. It also lists amnounts
Vendor
items delivered
OKReceiver
Use Case 2
Use Case 6
Replenish
store
Use Case 3
Inspect items
OK
Inspection
officer
Use Case 4
Stores Update
To accounts
officer inventory officer
Use Case 5
Issue items
requisitioned
Use Case 7
Customer
OK
Accounts
Pay vendor
To vendor
Bill customer
Figure 10.5 Use case diagram for examples of Sec. 10.1, 10.2.
j for 0t
then in detail as Use Case 9,
specified
reguirement is
putton.
P r i m a r y
software
The
Bank's Computer System, ATM Security officer, ATM maintenance officer.
holders:
Pre-conditions
The
machine can dispense ? 15,000, 10,000, 5000, 2000, 1000, 500 and 100. Five
1. dispensed will be 100. Rest?500 notes.
notes
Maximum withdrawal per day per customer is 15,000.
2. has a ATM card of the bank.
valid
Customer
4.3 Bank has for each card issued a corresponding thumb print of customer in its
customer database.
5. There is sufficient cash stored in the ATM to cater to at least a day's estimated
withdrawal with sufficient 100 denomination currency notes.
Power OK. Communications line active from ATM to Bank's Computer System.
Main Success Scenario
1 ACUustomer inserts card in slot at the door of ATM cubicle and removes it. The
door opens allowing customer inside provided the card is valid.
2. ATM displays welcome banner and tells customer to select language of choice.
Three languages displayed one opposite each button on the right panel of ATM
(Figure 10.6).
3. Customer presses abutton of his choice.
4. ATM displays a message in the language selected by the customer to insert card
in slot and place thumb in the biometric thumb reader.
5. Customer inserts card in the slot and places thumb on the reader.
6. Bank sends card information and thumb print to the bank's computer system via
communication lines.
1. Computer system checks validity of card and thumb print. If OK, it displays
message to customer (Figure 10.6) to select cash withdrawal or balance enquiry.
o. Customer selects cash withdrawal, by pressing the button on the left of the
display.
stomer presses appropriate button on the left of the display based on the
amount needed (Figure 10.6).
10. ATM ejects
customer's card, flashes message requesting customer to take the card
ShePs. The customer is expected to take the card within one minute. If he/
Sne does not take the card it is an exception
condition.
Systems
Design of lnformotion
150 Analysis ond
in the customep''s
requested < minimum balance account
customer is less than
I1. If amount
dispenses the day
forspecified
money in
cash withdrawal
by the 15,000 and the
denominations. It beeps and instructsththe
en
totake money by flashing message on ATM display. Customer is expected the
condition
a minute. If not it is an exception
12. the
After thewithin
cash customer takes the cash ATM sends message to the cOmputer to
the customer
and flashes message to to
his/her account, beeps
IS
transaction with printed
updated slip by ATM
dispensed
machine. The customer's
withdrawal colect
amount and his current balance is [Link] A
the t
ready to take another
13. The ATM reverts to
30 seconds.
initial state and is
transacton at
Exceptions cubicle.
Power failure, customer cannot enter ATM
1. available"
ATM displays "ATM not Bank's
2. Communication failure, s
system should check
communication lines, by sending message once a compu
minute
case of failure the Bank's Computer
see if it is received back. In
inform ATM maintenance officer.
System shoaant
do not match. Instruct customer to
3. Card information andthumb print
again. If second time also there is failure one possible action is not toplaceeject hutcat
Another action may be to eject card
and ask customer to report to Bank. the customer to insert card and
one more attempt by aflashing message to
thumb and reader, and place thumb on reader. lf it fails again do not returm again, wigivge
and ask customer to report to bank (Exception action to be clarified by ATM
Security officer. ATM may have a video camera to take a picture of customer)
4. Communication line fails during success scenario 6. Eject card. Display ATM
failed. Ask customer to try again after 10 minutes. Inform ATM maintenance esta.
5. Power fails during success scenario 6. Ask customer to report to bank (Bank ha
to decide exception action).
6. Power or communication fails during success scenarios 7, 8or 9. Do not dispense
Maintenance.
cash. No change in balance. Inform ATM
7. Ifcustomer's balance is less than the amount requested flash message "insuffitie
balance". Eject card. Print balance statement.
8. If customer's withdrawal during the day including current request greater than
15,000 flash message "Exceed maximum, withdrawal for the day". Eiect cand
9. ATM does not have sufficient balance to dispense money requested. Flash messap:
ATM has no cash. Abort transaction. Banking system should inform ATM
maintenance staff. Print balance statement slip.
10. ATM does not have enough paper to print balance or printer is defective ([Link]
ribbon or printer jammed). Flash message printer defective. Bank's computer systerm
should inform ATM maintenance staff.
11. Customer, after taking cash, reinserts card within 30 seconds. ATM does not
accept card and displays "wait for 30 seconds" and beeps.
12. Customer does not take card within one minute after it is ejected in spitechange
ofui
not
message to take card and warning beeps. Do not dispense cash. Dotakecard I
balance in account. Flash message and beep requesting customer to
he still does not, abort transaction and report to ATM security officer.
Use Case Method 151
Customer to take cash within one minute. If he/she does not, infor
Customer beepsecurity
ATM asking
13.
o f f i c e r .
M i n i m u m G u a r a n t e e
credit card and his or her thumb print matches the one in the
valid
customer has
greater than the cash requested and if he
data
credit is or she has not drawn more
that date money would have been dispensed. If an
Ifa his
and
or belongingData
ATM
Observe the large number of exception situations which may arise. All these are not
statement
security staff
for ATM
and ATM
Similar
enquiry.
These
use
Use case 9 was
left as
are Most
cases may
exefor
rciscash
be written
the
student.
e s to withdrawal. Aseparate use case may be witten tor
of it will be found in use case 9 and we mav think of this USe case
bankingSyte
bala.
as bei
included in it.
DIAGRAMS
FOR ATM
STICK
10.5
In addition tothe detailed written use cases, stick diagrams are useful tO get an overien
of the use cases. We givein Figure 10.7the overview of use case withdraw cash as asic
diagram. In Figure 10.8, 10.9 and 10.10 we give use cases for the other stake holders
Restore power
Refillcash
Repair printer
OK Check
ATM
maintainance Communication
engineer <<includes>> Replace ribbon
Repair
card reader
s<includes> Replace paper
Repair thumb
print reader
Authenticate
Customer
Check balance
and total withdrawn
system
Print balance
statement
Reconcile accounts
periodically
Log unusual
incidents
In 1se case diagram two more conventions are used. One of them is called includes
and the otheris called extends. In the ATM example, balance statement printing was part
a se case withdraw cash. If aseparate balance enquiry is to be shown in the use
e diagram, it can be modified as in Figure 10.11, where balance enquiry is shown as
included in withdraw cash. In the ATM example we assumed that only the card of the
bank owning the ATM is permitted to be used. If we want to allow cards of other
(ooperating banks, then we can use an extension as shown in Figure 10.11. Use case
description for this case has to be separately written.
ATM card of
another bank
Computer system
of other bank
Design of
Analysis and
154
CASES
WITH USE is the
TESTING requirements
generation of
10.6
use case
analysis of
of
generating test cases is to test cas
aspect of thedeveloped. The
{he take
andmethod each one of
important
scenario
da
system is
An
whenthe
final
invoke each
will
ofthe
cases in the
success
excepün
which
conditions. 1
illustrate this
for use case
We
Test Cases with order
id, as the primary index.
data base
record
following data
where Ris the
1. Retrieve from delivery notes with exhaustive
data. If
rignt value
test needed
of6test specific
Create a set of the
2. wrong value
and W the
cases may
be created. item id qty.
2 = 32 test Vendor id date
Order id R R
R
W R R
tc1: R
W R
tc2 :
R W R
R W
tc3: R
R R
R R W
tc4 : R
R R R R
tc5 : R
tc6 : R 6is used. In all
case
updated when test
is other
received database printed.
3. Check if item error message
should be
cases, an
appropriate
delivery note
dispatched to inspection office.
success scenario whether
4. Check in
10.7 CONCLUSIONS
the
employed
6 Pre-conditions are the assumptions made by the primary actor while designing the
system to meet the specified goal(s).
7Main success scenario lists the behaviour of the use case when everything goes
according to plan.
8. Minimum guarantees specifies what holds true after the use case is completed. It
Specifies whether allstake holders interests have been protected.
9. Exceptions list what could go wrong during a use case and what actions are
needed in such cases. Usually these contain situations which have not been
foreseen by the client and a system designer requires clarifications.
naddition to this a stick diagram would be useful to get abird's eye view of a system.
SUMMARY
EXERCISES
banks.
Develop a use case where ATM security officer is the primary actor
10.10)
Figure
D e v e l o p
a
stick diagram Corresponding to Exercise 10.6.
Develop
a
stick
diagram corresponding to Exercise 10.7.
1 0 1 4
a
stick diagram corresponding to Exercise 10.8.
Develop
1015 test cases for the mess billing system of Section 4.7 using the use case
Develop
D Exercise 10.6.
of
1 0 1 6
test
cases for Exercise 10.7.
Develop
0.18