UNB/ CS/ David Bremner/ teaching/ java/ BankAccountTest.java
public class BankAccountTest
{  public static void main(String[] args)
   {  BankAccount account = new BankAccount(10000);
   
      final double INTEREST_RATE = 5;
      
      double interest;

      // compute and add interest for one period      

      interest = account.getBalance() * INTEREST_RATE / 100;
      account.deposit(interest);
      
      System.out.println("Balance after year 1 is $" 
         + account.getBalance());
      
      // add interest again      

      interest = account.getBalance() * INTEREST_RATE / 100;
      account.deposit(interest);
      
      System.out.println("Balance after year 2 is $" 
         + account.getBalance());
   }
}