investment duration interest rates offered
Less then 3 months 5%
3month-11 months 5.5%
1 year-23 months 7.6%
2 years and above 7.9%
Note: Interest = Total investment *Interest rates *Duration
Q: How to write a java application to compute the total accumulated investment after the investment periods?