/**
 * BankingProgram.java
 *
 * BankingProgram application
 *
 * Caitlin Ross
 * 100735219
 *
 * 2007/10/18
 */
 
public class BankingProgram {
    
    public static void main(String[] args) {
    	 
    	 //First testing output
    	 /*String customerName = "Me";

         BankAccount account1 = new BankAccount(customerName );
        
         account1.deposit(1000.0);
         account1.deposit(500.0);
         account1.withdraw(200.0);
         account1.withdraw(1200.0);
         account1.withdraw(2200.0); 

         String customerName2 = "You";        
         BankAccount account2 = new BankAccount(customerName2 );
        
         account2.deposit(1500.0);
         account2.withdraw(1200.0);
         account2.withdraw(200.0); 

         System.out.println(account1 + '\n');
         //should cause account summary to be printed
        

        account2.printHistory();
        //should cause account summary and transactions to be printed*/
        
        
        //Second testing output
        /*BankAccount account = new BankAccount("Alex");
        
        System.out.println(account);
        
        account.deposit(300);
        account.deposit(2000);
        account.deposit(400);
        account.withdraw(50);
        account.deposit(55);
        
        account.printHistory();
        
        account.withdraw(473);
        
        account.printHistory();
        account.printHistory(3);*/
        
        
        //Third testing output
        BankAccount[] accounts = new BankAccount[5];
        
        for(int i=0; i<accounts.length; i++){
        	accounts[i] = new BankAccount("Person #" + i);
        	accounts[i].deposit(i*100);
        }
        
        for(int i=0; i<accounts.length; i++){
        	System.out.println(accounts[i]);
        	System.out.println(accounts[i].getOwner() + ": " + accounts[i].getBalance() + "\n");
        }
    }
}
