CRC Cards for ATM Example

Using CRC cards to assign responsibiities to various classes for the tasks required by the various use cases leads to the creation of the following cards.

The following links can be used to go directly to the CRC cards for the various classes:


Class ATM

ResponsibilitiesCollaborators
Start up when switch is turned onOperatorPanel
CashDispenser
NetworkToBank
Shut down when switch is turned offNetworkToBank
Start a new session when card is inserted by customerCustomerConsole
Session
Provide access to component parts for sessions and transactions

[ Links for this class ]


Class CardReader

ResponsibilitiesCollaborators
Tell ATM when card is insertedATM
Read information from cardCard
Eject card
Retain card

[ Links for this class ]


Class CashDispenser

ResponsibilitiesCollaborators
Keep track of cash on hand, starting with initial amount
Report whether enough cash is available
Dispense cashLog

[ Links for this class ]


Class CustomerConsole

ResponsibilitiesCollaborators
Display a message
Display a prompt, accept a PIN from keyboard
Display a prompt and menu, accept a choice from keyboard
Display a prompt, accept a dollar amount from keyboard
Respond to cancel key being pressed by customer

[ Links for this class ]


Class EnvelopeAcceptor

ResponsibilitiesCollaborators
Accept envelope from customer; report if timed out or cancelledLog

[ Links for this class ]


Class Log

ResponsibilitiesCollaborators
Log messages sent to bank
Log responses from bank
Log dispensing of cash
Log receiving an envelope

[ Links for this class ]


Class NetworkToBank

ResponsibilitiesCollaborators
Initiate connection to bank at startup
Send message to bank and wait for responseMessage
Log
Balances
Status
Terminate connection to bank at shutdown

[ Links for this class ]


Class OperatorPanel

ResponsibilitiesCollaborators
Inform ATM of changes to state of switchATM
Allow operator to specify amount of initial cash

[ Links for this class ]


Class ReceiptPrinter

ResponsibilitiesCollaborators
Print receiptReceipt

[ Links for this class ]


Class Session

ResponsibilitiesCollaborators
Perform session use caseATM
CardReader
Card
CustomerConsole
Transaction
Update PIN value if customer has to re-enter it

[ Links for this class ]


Abstract Class Transaction

ResponsibilitiesCollaborators
Allow customer to choose a type of transactionATM
CustomerConsole
Withdrawal
Deposit
Transfer
Inquiry
Perform Transaction Use CaseATM
CustomerConsole
Withdrawal
Deposit
Transfer
Inquiry
Message
NetworkToBank
Receipt
ReceiptPrinter
Perform invalid PIN extensionCustomerConsole
Session
CardReader

[ Links for this class ]


Class Withdrawal

ResponsibilitiesCollaborators
Perform operations peculiar to withdrawal transaction use caseCustomerConsole
CashDispenser
Message
Receipt

[ Links for this class ]


Class Deposit

ResponsibilitiesCollaborators
Perform operations peculiar to deposit transaction use caseCustomerConsole
Message
EnvelopeAcceptor
Receipt

[ Links for this class ]


Class Transfer

ResponsibilitiesCollaborators
Perform operations peculiar to transfer transaction use caseCustomerConsole
Message
Receipt

[ Links for this class ]


Class Inquiry

ResponsibilitiesCollaborators
Perform operations peculiar to inquiry transaction use caseCustomerConsole
Message
Receipt

[ Links for this class ]


Class Balances

ResponsibilitiesCollaborators
Represent account balance information returned by bank

[ Links for this class ]


Class Card

ResponsibilitiesCollaborators
Represent information encoded on customer's ATM card

[ Links for this class ]


Class Message

ResponsibilitiesCollaborators
Represent information to be sent over network to bank

[ Links for this class ]


Class Receipt

ResponsibilitiesCollaborators
Represent information to be printed on a receipt

[ Links for this class ]


Class Status

ResponsibilitiesCollaborators
Represent transaction status information returned by bank

[ Links for this class ]


Page of links for non frames-enabled browsers.

Valid XHTML 1.0!

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