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 ] [ State Diagram ] [ Interaction Diagram ]
[ CRC Cards ] [ Class Diagram ] [ Class Desc. Forms ] [ Operation Desc. Forms ] [ Code ] [ Executable ]

Copyright © 1996, 1997, 1998 - 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 customer choice from a menu of options Display
Keyboard
Get amount entry (typed in) from customer Display
Keyboard
Verify that sufficient cash is available for withdrawl CashDispenser
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 failure of a transaction,
and ask if he/she wants another
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 menu of choices
Display "Enter Amount" screen
Display "Deposit Envelope" screen
Display "Card unreadable" screen
Display "Transaction failed because ... want another?" screen
Display "Invalid PIN - re-enter" screen
Display "Card retained" screen
Echo input from the keyboard
Clear current message from screen when no longer needed
 
 
[ Class Description Form ]

Class Keyboard
Responsibility Collaborator(s)
Read PINDisplay (echo *'s)
Read choice from menu
Read amount entry (typed)Display (echo amount)
 
 
[ 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
Transaction
Perform failed transaction extension ATM
Furnish card number to Transaction
Furnish PIN to Transaction
 
 
[ Class Description Form ]

Class Transaction
Responsibility Collaborator(s)
Allow customer to choose a transaction type
then create an object of appropriate subclass
WithdrawlTransaction
DepositTransaction
TransferTransaction
InquiryTransaction
ATM
Perform a particular transaction use case WithdrawlTransaction
DepositTransaction
TransferTransaction
InquiryTransaction
Session
 
 
[ 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)
Allow customer to choose an account type from a list of possibilities ATM
Initiate withdrawl
Finish withdrawl
Initiate deposit
Finish deposit
Do transfer
Do inquiry
Provide information about reason for rejection of a transaction
 
 
[ Class Description Form ]