Professional Documents
Culture Documents
A Discussion
Case Study
A Bank wishes to introduce ATM service to provide
limited facilities to her customers. Customers may get
ATM cards on request. Users may view their balance or
transfer or withdraw money using these cards. Cards
may be used to access many accounts and an account
may be accessed using different cards. A card may be
blocked temporarily or permanently (e.g. If it is lost) by
the Bank. A PIN is associated with each card to verify
the authority of the user. There is an OD limit associated
with each cheque account. Theoretically, any amount
may be withdrawn from a cheque account at any time
(provided it is less than the balance+Odlimit). There is no
OD facility for a savings account.
Case Study (cty)
The personal information of the customers and
their account details are already maintained by
the Banks main system. A subsystem is
required to handle the ATMs functionality. Two
hardware systems Card reader and Money
dispenser will communicate with this subsystem.
The card reader reads the Cards ID and passes
it to the system. It is also able to eject the card
when an eject signal is received from the
system. Similarly the money dispenser is able to
dispense the required amount of money.
Case Study-3
The Limited ATM system is required to provide
at least the following operations.
Enter a new card / new account detail
Block /Reactivate/Cancel a card
View the balance of the account
Withdraw money from the account
Transfer money from one account to another
Change the PIN of a card
The validity of the card and the authority of the
User will be checked for each transaction session.
A Business Client Clerk Manage
Activity r
Diagram :Card
Apply for Card [Recorded]
Record Detail
Approve
:Card
[Finalised]
Finalise Card :Card
[Approved]
Receive Card
[PIN OK]
Give PIN
[PIN OK]
[Quit]
Select Service
[withdraw]
CARD MANIPULATION
Clerk store a new CARD detail
Clerk add another account to a CARD
Clerk & Client shall fix new PIN first time
Client shall change the PIN
TRANSACTIONS
Client shall view the balance (within 2 minutes)
Client shall withdraw money from savings/
current account within the limit
Client shall transfer money within the limit
Use Cases Transactions
transfer
withdraw
Client
view Balance
Add structures
Use Cases Transactions Structures added
transfer
withdraw
get Accounts
Client
view Balance
print Balance
Use Cases Card Manipulation
fix PIN
Client
Add structures
Use Cases Card Manipulation
fix PIN
Client
[accounts>1]
Displays all
accounts
[Quit]
System asks for
Amount to withdraw
Eject Card
Issue cash
Complete other Usecases!
View Balance
Transfer
Add Card
Add Account
Change PIN
Change Status
Check PIN
ATM ; E-R Diagram Classes (ITE-1)
ATMSavings ATMCustome ATMCheque
1..* rcustID 1..*
accID accID
balance 0..* getCustID() 0..* balance
getAccID() 1 oDlimit
setBalance() 1..* getAccID()
getBalance() setBalance()
ATMCard
getBalance()
1..* cardNo
pin 1..*
0..* status 0..*
getCardID()
For the time being there is setPIN()
no need for an Association checkPIN() What if, the date joined (an
Class or Attributed setStatus() Account to a Card) attribute
Association is important ?
getStatus()
Realize Usecases
Identify Systems Tasks
Identify Collaborating Objects
Allocate Responsibilities
Draw CRC
Draw Colloboration
Assign a Ctrl class (and a UI class- if necessary)
for each usecase.
Draw Collobaration again
Update Class diagram
Withdraw From Current
Name : Withdraw From Current Identify Systems Tasks
Actor : Client
Pre-conditions : User already logged-in Identify Nouns
A menu is active with withdraw option
Post-conditions : Amount is deducted from users account
Purpose : To allow the client to withdraw money
Description:
(1) Client initiates this usecase by selecting withdraw
(2) System get all the accounts (use case get Account)
(3) System displays all the accounts and prompts to select any one
(3) Client selects one account
(4) System prompts for the amount
(5) Client indicate an amount
(6) System issues money, update record, and confirms
Alternative courses:
(3) & (4) System selects the only one available account
(6) requested amount is bigger than balance, system display message
Errors:
Systems Tasks Identified
Identify Collaborations
1 withdra
w
Client
withdra
w
2 :Card :Account
CRC - Allocate Responsibilities
Responsibilities Collaborations
Provide Withdrawal
Collaboration Diagram (Initial Idea)!
1 getAllAccDetail()
2 *getAccDetail()
4 withdraw(amm)
3 withdraw(acc,am
::Card
::Account
Client m)
Collaboration Diagram,
with UI and CTRL objects!
0
withdraw(cID)
3 selectAccount 2 startUI()
5.1 withdraw(am
4 proAmou 5 withdraw(acc,am) )
Client nt ::withdrawUI ::withdrawCtrl
1 getAllAccDetail()
1.1 *getAccDetail() ::Cheque
::Card
Issue Cash?
Analysis Level Class Diagram : Ite-2
ATMSavings ATMCustome ATMCheque
1..* rcustID 1..*
accID accID
balance balance
accName 0..* getCustID() 0..*
oDlimit
1 accName
getAccID()
setBalance() 1..* getAccID()
getBalance() 1..*
1..* setBalance()
getAccDetail() ATMCard getBalance()
withdraw(amo) 0..* getAccDetail()
cardNo 0..* withdraw(amo)
pin
status
ATMwdUI
getCardID()
setPIN() ATMwdCTRL
startUI();
selectAcc(); getPIN()
proAmount(); setStatus() withdraw(cID)
getStatus() withdraw(aID,amo)
getAllAccDetail()
ATMwdUI getCardID()
setPIN()
ATMwdCTRL getPIN()
startUI(); setStatus()
selectAcc();
proAmount();
getStatus()
withdraw(cID) getAllAccDetail()
withdraw(aID,amo)
Which version is better, why?
Sequence diagram
with entity objects only
Client
:Card :Account
getAllAccDetail() *getAccDetail( )
withdraw(acc,am)
withdraw(am)
:withdrawUI *getAllAccDetails()
startUI() *getAccDetail()
selectAccount()
proAmount()
withdraw() withdraw()
Issue Cash?
fixPIN()
OnUse
OnUse Active
setStatus()
after [1 year]
Blocked
Lapsed
~Card()
Withdraw- Operation Specification
Pre- and Post-condition Pair
pre-conditions:
CARD is valid
ACCOUNT is valid
ACCOUNT is associated with CARD
amount is valid
post-conditions:
if amount is greater than ACCOUNT.balance
value of ACCOUNT.balance set equal to
ACCOUNT.balance-amount
value of result set equal to success
otherwise
value of result set equal to failure
Issue Cash?
Structured English- withdraw
get all the accounts associated with CARD
if there are more than one ACCOUNT
Do while there is no more ACCOUNTS left
get all the details associated with ACCOUNT
display details
endDo
set ACCOUNT to user selected ACCOUNT
else
set ACCOUNT to the only existing ACCOUNT
endIf
if ACCOUNT.balance is greater than amount
set ACCOUNT.balance to ACCOUNT.balance amount
set result to TRUE
else
set result to FALSE
endIf
return result
Issue Cash?
Activity Diagram- Withdraw
Get Account
Details [more]
[no more]
Get Users
Get amount
Choice (say A)
Result FALSE
[amount < =A . balance]
A.balance
A.balance-amount
Result TRUE
Issue Cash?