// Allison Obourn
// CS& 141, Winter 2021
// Lecture 15

// Client that uses our custom BankAccount class.
// Creates a couple bank accounts, prints out whether a withdrawal was successful
// and prints the balance twice.

public class BankAccountClient {
   public static void main(String[] args) {
      BankAccount account = new BankAccount("Allison", 100.0);
      BankAccount account2 = new BankAccount("Robin", 3.45);
      BankAccount account3 = new BankAccount("Joshua", 1972.2);
      
      System.out.println(account.withdraw(105));
      System.out.println("before: " + account.getBalance());
      
      // NOTE: the following code worked until we made our fields private. 
      //       now that our BankAccount fields are private, it won't compile.
      //account.balance -= 2000;
      
      System.out.println("after: " + account.getBalance());
      System.out.println(account);
      
      
   }
}