/* * Bank.java * * Created on April 20, 2005, 9:40 AM */ /** * * @author levenick */ public class Bank { Account account1 = new Account(); Account account2 = new Account(); Account account3 = new Account(); Account currentAccount = account1; /** Creates a new instance of Bank */ public Bank() { } public int getBalance() { return currentAccount.getBalance(); } public void withdraw(int withdrawalAmount) { currentAccount.withdraw(withdrawalAmount); } public void selectAccount1() { currentAccount = account1; } public void selectAccount2() { currentAccount = account2; } public void selectAccount3() { currentAccount = account3; } }