ATM Simulation

CRC Model


Keypad

Responsibilities

Collaborators

Get Value from User  

 
 

Customer

Responsibilities

Collaborators

Get Account
match customer number and PIN  

 
 

Bank

Responsibilities

Collaborators

Read customer list from file
Find Customer Customer

 
 

BankAccount

Responsibilities

Collaborators

Get current balance  
Deposit funds  
Withdraw funds  

 
 

ATM

Responsibilities

Collaborators

Set state  
Select Customer Bank, Keypad
Select Account Customer, BankAccount, KeyPad
Do Withdrawal BankAccount, KeyPad
Do Deposit BankAccount, KeyPad