package com.imsl.test.example.finance; import com.imsl.finance.*; import java.text.NumberFormat; /** *
* Computes the future value of an investment with scheduled rate of growth.
* An investment of $10,000 is made. The investment will grow at the rate of * 5.1% the first year, with the rate increasing by .1% each year thereafter for * a total of 5 years. The future value of the investment is computed. * * * @see Code * @see Output */ public class FinanceFvscheduleEx1 { public static void main(String args[]) { double principal = 10000.0; double[] schedule = {.050, .051, .052, .053, .054}; double fvschedule; fvschedule = Finance.fvschedule(principal, schedule); System.out.println("After 5 years the $10,000 investment " + "will have grown to " + NumberFormat.getCurrencyInstance().format(fvschedule)); } }