01: /**
02:    This program computes how much an investment grows in
03:    a given number of years.
04: */
05: public class InvestmentTester
06: {
07:    public static void main(String[] args)
08:    {
09:       final double INITIAL_BALANCE = 10000;
10:       final double RATE = 5;
11:       final int YEARS = 20;
12:       Investment invest = new Investment(INITIAL_BALANCE, RATE);
13:       invest.waitYears(YEARS);
14:       double balance = invest.getBalance();
15:       System.out.printf("The balance after %d years is %.2f\n", 
16:             YEARS, balance);
17:    }   
18: }