previous |
start |
next
Example: An Automatic Teller Machine - Implementation
- Start implementation with classes that don't depend on
others
- Keypad
- BankAccount
- Then implement Customer which depends only on BankAccount
- This bottom-up approach allows you to test your classes
individually
- For ATM class: Associated classes in UML diagram give instance
variables
- private Bank theBank;
- private KeyPad pad;
- Other instance variables needed
- private int state;
- private Customer currentCustomer;
- private BankAccount currentAccount;
previous |
start |
next