ATM Problem CRC cards

  1. Class ATM - with component parts:
    1. Class CardReader
    2. Class Display
    3. Class Keyboard
    4. Class CashDispenser
    5. Class EnvelopeAcceptor
    6. Class ReceiptPrinter
    7. Class OperatorPanel
  2. Class Session
  3. Class Transaction - with subclasses:
    1. Class WithdrawlTransaction
    2. Class DepositTransaction
    3. Class TransferTransaction
    4. Class InquiryTransaction
  4. Class Bank

 

[ Intro ] [ Requirements ] [ Domain Objects ] [ Use Cases ] [ CRC Cards ] [ Class Diagram ]
[ Class Description Forms ] [ Operation Description Forms ] [ Code ] [ Executable ]

 

Copyright © 1996 - Russell C. Bjork. Permission for non-commercial reproduction for educational use is hereby granted; all other rights are reserved.

 


Class ATM
Responsibility Collaborator(s)
Start up system operation OperatorPanel
Start a session for each customer as he/she arrives Display
CardReader
Session
Shut down on operator request OperatorPanel
Get PIN from customer Display
Keyboard
Get transaction choice from customer Display
Keyboard
Ask customer if he/she wants another transaction Display
Keyboard
Get account choice from customer Display
Keyboard
Get amount choice (from menu) from customer Display
Keyboard
Get amount entry (typed in) from customer Display
Keyboard
Verify that sufficient cash is available for withdrawl CashDispenser
Display (to report if not)
Dispense cash CashDispenser
Accept deposit envelope from customer Display
Envelope Acceptor
Issue receipt to customer ReceiptPrinter
Require customer to re-enter PIN Display
Keyboard
Inform customer of reason for rejecting a transaction Display
Keyboard
Return ATM card to customer CardReader
Permanently retain customer card Display
CardReader
 
 
[ Class Description Form ]

Class CardReader
Responsibility Collaborator(s)
Check for readable card inserted
Return number read from card
Eject card
Retain card
 
 
[ Class Description Form ]

Class Display
Responsibility Collaborator(s)
Display "Insert Card" screen
Display "Enter PIN" screen
Display "Choose transaction" screen
Display "Want another transaction?" screen
Display "Choose Account" screen
Display "Choose Amount" screen
Display "Enter Amount" screen
Display "Deposit Envelope" screen
Display "Card unreadable" screen
Display "Not enough cash available" screen
Display "Transaction rejected (by bank)" screen
Display "Invalid PIN - re-enter" screen
Display "Card retained" screen
Clear current message from screen when no longer needed
 
 
[ Class Description Form ]

Class Keyboard
Responsibility Collaborator(s)
Read PIN
Read transaction choice
Read "Another transaction?" choice
Read account choice
Read amount choice (from menu)
Read amount entry (typed)
Wait for customer to press enter key after reading an error screen
 
 
[ Class Description Form ]

Class CashDispenser
Responsibility Collaborator(s)
Set initial cash on hand at startup
Report cash available
Dispense cash
 
 
[ Class Description Form ]

Class EnvelopeAcceptor
Responsibility Collaborator(s)
Accept envelope
 
 
[ Class Description Form ]

Class ReceiptPrinter
Responsibility Collaborator(s)
Print receipt
 
 
[ Class Description Form ]

Class OperatorPanel
Responsibility Collaborator(s)
Indicate state of on-off switch
Get initial cash on hand from operator
 
 
[ Class Description Form ]

Class Session
Responsibility Collaborator(s)
Perform session use case ATM
Transaction
Perform invalid PIN extension ATM
Bank
Furnish card number to Transaction
Furnish PIN to Transaction
 
 
[ Class Description Form ]

Class Transaction
Responsibility Collaborator(s)
Perform a particular transaction use case WithdrawlTransaction
DepositTransaction
TransferTransaction
InquiryTransaction
Session
Bank
 
 
[ Class Description Form ]

Class WithdrawlTransaction
Responsibility Collaborator(s)
Get specifics from customerATM
Send to bankSession
Bank
Dispense cash, issue receipt, and notify bank when complete ATM
Bank
 
 
[ Class Description Form ]

Class DepositTransaction
Responsibility Collaborator(s)
Get specifics from customerATM
Send to bankSession
Bank
Accept envelope, issue receipt, and notify bank when complete ATM
Bank
 
 
[ Class Description Form ]

Class TransferTransaction
Responsibility Collaborator(s)
Get specifics from customerATM
Send to bankSession
Bank
Issue receiptATM
 
 
[ Class Description Form ]

Class InquiryTransaction
Responsibility Collaborator(s)
Get specifics from customerATM
Send to bankSession
Bank
Issue receiptATM
 
 
[ Class Description Form ]

Class Bank
Responsibility Collaborator(s)
Initiate withdrawl
Finish withdrawl
Initiate deposit
Finish deposit
Do transfer
Do inquiry
Provide information about reason for rejection of a transaction
 
 
[ Class Description Form ]