// CSE 142, Spring 2010, Marty Stepp // This client program uses BankAccount objects. public class Bank { public static void main(String[] args) { // construct two BankAccount objects BankAccount marty = new BankAccount("Marty Stepp", 1000000.00, 12345); marty.setTransactionFee(5.00); BankAccount benson = new BankAccount("Benson Limketkai", 2.00, 99999); // make several deposits in an account (some valid, some invalid) marty.deposit(1000.00); marty.deposit(-20958.00); // will fail (negative amount) marty.withdraw(1000.00); // marty.balance = 0.00; // pwned! // make several withdrawals from an account (some valid, some invalid) benson.withdraw(1.50); benson.withdraw(-1000.00); // will fail (negative amount) benson.withdraw(1.00); // will fail (not enough money) // benson.balance -= 1.00; // marty.balance += 99999999.99; // test our toString method System.out.println(marty); System.out.println(benson); } }