01: /**
02: This program computes how long it takes for an investment
03: to double.
04: */
05: public class InvestmentRunner
06: {
07: public static void main(String[] args)
08: {
09: final double INITIAL_BALANCE = 10000;
10: final double RATE = 5;
11: Investment invest = new Investment(INITIAL_BALANCE, RATE);
12: invest.waitForBalance(2 * INITIAL_BALANCE);
13: int years = invest.getYears();
14: System.out.println("The investment doubled after "
15: + years + " years");
16: }
17: }