// 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.name = "Marty Stepp"; marty.balance = 1000000.00; marty.id = 12345; BankAccount benson = new BankAccount(); benson.name = "Benson Limketkai"; benson.balance = 2.00; benson.id = 99999; // make several deposits in an account (some valid, some invalid) marty.deposit(1000.00); marty.deposit(-20958.00); // will fail (negative amount) // 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) // test our toString method System.out.println(marty); System.out.println(benson); } }