ATM Case Study - PowerPoint PPT Presentation

1 / 36
About This Presentation
Title:

ATM Case Study

Description:

Customers may get ATM cards on request. Users may view their balance or transfer or withdraw money ... Post-conditions : Amount is deducted from user's account ... – PowerPoint PPT presentation

Number of Views:757
Avg rating:3.0/5.0
Slides: 37
Provided by: smoh2
Category:
Tags: atm | case | deducted | lapsed | study

less

Transcript and Presenter's Notes

Title: ATM Case Study


1
ATM Case Study
  • A Discussion

2
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 balanceOdlimit). There is no OD
    facility for a savings account.

3
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.

4
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.

5
A Business Activity Diagram
Applying for New Card
6
A BusinessActivity Diagram
Client arrives at ATM
CARD valid
Insert Card
CARD valid
Give PIN
PIN OK
PIN OK
Quit
Select Service
withdraw
Eject Card
View Balance
Withdraw
ClientTransaction
Client leaves ATM
7
Glossary
  • ATM Card -
  • Withdraw -

8
Requirement List
  • Client shall view the balance
  • Client shall withdraw money within a limit
  • Client shall change the PIN
  • Bank Clerk shall store a new CARD detail
  • Bank Clerk shall add another account to a CARD
  • Shall check the CARDs validity
  • Shall verify the PIN
  • Shall use 3-DCS (168 bits) encoding

9
Grouping the Candidate Requirements
  • 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

10
Use Cases
Transactions
transfer
withdraw
Client
view Balance
Add structures ?
11
Use Cases
Transactions
Structures added
transfer
withdraw
get Accounts
Client
view Balance
print Balance
12
Use Cases
Card Manipulation
fix PIN
Client
add new account
Clerk
add new card
Add structures ?
13
Use Cases
Card Manipulation
fix PIN
Client
add new account
Clerk
add new card
14
ATM- Withdraw From Current
  • Name Withdraw From Current
  • Actor Client
  • Pre-conditions User already logged-in
  • 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

Issue Cash?
15
Usecase Description- Withdraw from Savings
16
Prototype Withdraw from Current
  • Select A Service
  • Withdraw
  • View Balance
  • Transfer
  • Select An Account
  • Cheque
  • Savings (House)
  • Credit

Give An Amount
Suceess Take Your Money Another Transaction? Get
Your Card?
OK
OK
OK
17
ATM- Withdraw
Client selecetd withdraw
account1
System gets all accounts
accountsgt1
Displays all accounts
Client Select One Account
Quit
System asks for Amount to withdraw
amount gt balance
amount gt balance
Client selects Fast cash
Client types amount
Display message
Eject Card
Issue cash
18
Complete other Usecases!
  • View Balance
  • Transfer
  • Add Card
  • Add Account
  • Change PIN
  • Change Status
  • Check PIN

19
ATM E-R Diagram ? Classes (ITE-1)
ATMCustomer
ATMSavings
ATMCheque
1..
1..
custID
accIDbalance
accIDbalanceoDlimit
0..
0..
getCustID()
getAccID()setBalance()getBalance()
1
getAccID()setBalance()getBalance()
1..
ATMCard
1..
cardNopinstatus
1..
0..
0..
getCardID()setPIN()checkPIN()setStatus()getSta
tus()
For the time being there is no need for an
Association Class or Attributed Association
What if, the date joined (an Account to a Card)
attribute is important ?
20
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

21
Withdraw From Current
Identify Systems Tasks
  • Name Withdraw From Current
  • Actor Client
  • Pre-conditions User already logged-in
  • 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

Identify Nouns
22
Systems Tasks Identified
  • (1) System gets all the accounts on Card
  • (2) System displays the details of Accounts
  • (3) Prompts to select one
  • (4 System prompts for the amount
  • (5) System issue money
  • (6) Update records (update what?)

How to allocate these tasks to different classes?
23
Use case Realization!
Identify Collaborations
1
withdraw

Client
withdraw
2
24
CRC - Allocate Responsibilities
Class Name
Card
Responsibilities
Collaborations
Provide Card information.
Account provides Accounts detail.
Provide list of Accounts.
Class Name
Account
Responsibilities
Collaborations
Provide Account information.
Provide Withdrawal
25
Collaboration Diagram (Initial Idea)!
2
1
getAccDetail()
getAllAccDetail()
4
withdraw(amm)
3
withdraw(acc,amm)
Client
26
Collaboration Diagram, with UI and CTRL objects!
0
Issue Cash?
27
Analysis Level Class Diagram Ite-2
ATMCustomer
ATMSavings
ATMCheque
1..
1..
custID
accIDbalanceaccName
accIDbalanceoDlimitaccName
0..
0..
getCustID()
1
getAccID()setBalance()getBalance()getAccDetail(
)withdraw(amo)
1..
getAccID()setBalance()getBalance()getAccDetail(
)withdraw(amo)
1..
1..
ATMCard
0..
0..
cardNopinstatus
ATMwdUI
getCardID()setPIN()getPIN()setStatus()getStatu
s()getAllAccDetail()
ATMwdCTRL
startUI()selectAcc()proAmount()
withdraw(cID)withdraw(aID,amo)
What next? Identify Super-Sub Aggregations
28
Analysis Level Class Diagram (Ite-3)
ATMCustomer
1..
custID
1..
getCustID()
ATMSavings
ATMAccount
1
accIDbalanceaccName
1..
withdraw(amo)
ATMCard
getAccID()setBalance()getBalance()getAccDetail(
)withdraw(amo)
cardNopinstatus
0..
ATMCheque
1..
oDlimit
getCardID()setPIN()getPIN()setStatus()getStatu
s()getAllAccDetail()
withdraw(amo)
ATMwdCTRL
withdraw(cID)withdraw(aID,amo)
29
Analysis Level Class Diagram (ver-2)
ATMCustomer
1..
custID
1..
getCustID()
ATMSavings
ATMAccount
ATMCustAcc
1
accIDbalanceaccName
withdraw(amo)
1..
getAccID()setBalance()getBalance()getAccDetail(
)withdraw(amo)
ATMCard
ATMCheque
cardNopinstatus
oDlimit
withdraw(amo)
getCardID()setPIN()getPIN()setStatus()getStatu
s()getAllAccDetail()
ATMwdCTRL
withdraw(cID)withdraw(aID,amo)
Which version is better, why?
30
Sequence diagram
with entity objects only
Client

Card

Account



getAcc
Detail( )
getAllAccDetail()


withdraw(acc,am)

withdraw(am)


Use Case withdraw

31
With Boundary Control Classes
Sequence diagram

Account
withdrawCtrl
Card
Client


withdrawUI

getAllAccDetails()
startUI()
getAccDetail()



selectAccount()

proAmount()
withdraw()
withdraw()


Issue Cash?
Use Case withdraw

32
State Transitions
  • Include relevant State Transition Diagrams (or
    Activity Diagrams)

33
Statechart
CARD
Card()
fixPIN()
OnUse
setStatus()
after 1 year
Card()
34
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?
35
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?
36
Activity Diagram- Withdraw
Get Account Details
more
NoOfAccounts 1
NoOfAccounts gt 1
A ? Only Account
List an Account details
no more
Get Users Choice (say A)
Get amount
amount gtA . balance
Result ? FALSE
amount lt A . balance
A.balance ? A.balance-amount Result ? TRUE
Issue Cash?
Write a Comment
User Comments (0)
About PowerShow.com