Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Enter investment amount, for example 100: 10000 Enter yearly interest rate, for example 5.25: 3.75 Years 6.7Fancial ompue the re imestment value) Wrise a method

image text in transcribed
Enter investment amount, for example 100: 10000 Enter yearly interest rate, for example 5.25: 3.75 Years 6.7Fancial ompue the re imestment value) Wrise a method thn Future Value 10381.51 10777.58 11188.76 11615.63 12058.78 12518.83 12996.44 13492.28 14007.02 4541.41 15096.18 15672.12 16270.03 16890.76 7535.16 18204-15 18898.66 compuies future investment value at a given interest rate for a specified numbee of yeas The fture lovestenent is desermined using the formula in Programming Exercise 221 Use the following method header public static double futureinvesteent Value ( double investeentAmount, double monthlyinterestRate, 1nt years) For esample. futureIovesteentValue (10000, 0.05112, 5) returns 12833. 58. Write a test program that prompts the aser to enter the investment amoust (eg. 1,000) and the interest rate (4,9%)and prints a uble that displays future value for the years from I to 30, as shown beow: 10 ajYou need to write two classes for this problem. Name them Investment and InvestmentTest. The associated java files should be Investment.java and nvestmentTest.java. Make sure the two java files are saved at the same location on your computer. 12 13 14 15 16 17 b) The InvestmentTest class should contain only a main method. In this main method, the program takes user inputs of three values-investmentAmount in double, annualRate (annual interest ratej in double, and years in integer. The main method should also invoke a method from the Investment class to print the future value table for 30 years. c) The Investment class should contain two methods. 1. futurelnvestmentValue - use three parameters (investmentAmount, monthlyinterestRate, and years) to calculate and return the future value. The formula to calculate the future value is futureValue investmentAmount Math powfl+ monthlyinterestRate, years* 12) Note that monthlyinterestRate annualRate / 12 2. printFutureValueTable 0 print the future value table for 30 years. The table should look like the one below d) Design the printing layout as close of the above example, for 30 years

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions