//BankAccountTester.java source code /** * A class to test the BankAccount class. * @author The ITEC120 class in unison */ public class BankAccountTester { /** Tests the methods of the BankAccount class. * @param args not used */ public static void main(String[] args) { BankAccount b; b = new BankAccount( ); System.out.println( "Balance is " + b.getBalance() + ", expected 0.0." ); BankAccount c = new BankAccount( 9.87 ); System.out.println( "c's Balance is " + c.getBalance() + ", expected 9.87." ); b.deposit( 4.56 ); System.out.println( "Balance is " + b.getBalance() + ", expected 4.56." ); b.deposit( 0.01 ); System.out.println( "Balance is " + b.getBalance() + ", expected 4.57." ); b.deposit( 0.00 ); System.out.println( "Balance is " + b.getBalance() + ", expected 4.57." ); b.withdraw( 2.00 ); System.out.println( "Balance is " + b.getBalance() + ", expected 2.57." ); b.withdraw( 12.00 ); System.out.println( "Balance is " + b.getBalance() + ", expected -9.43." ); } }