Question: Name This lab assignment builds on using methods to simplify programming problems Instructions 1. Write your name above. 2. Create a class called InvestmentCalculator. It

 Name This lab assignment builds on using methods to simplify programming

problems Instructions 1. Write your name above. 2. Create a class called

Name This lab assignment builds on using methods to simplify programming problems Instructions 1. Write your name above. 2. Create a class called InvestmentCalculator. It will have both a main method and a local method called futureInvestmentValue. Before moving on to the next step, be sure to code the main method header and put comments for begin, loop, and end to be completed later method. The 3. Implement and test futureInvestmentValue futureInvestmentvalue method computes the future investment value given an investment amount, an annual percentage interest rate, frequency of compounding (in months) and a specified number of years. The future value is determined based on the following formula: futurevalue = investmentAmount x (1+ monthlyInterestRate) numberofYears frequencyoEcompounding For example, given : investmentAmount = $1000, annua!PctRate 12 (monthly) the 3.25%, and numberOfYears 41 , compounding calculated futureValue is $1,032.99. Use the following method header: static double futureInvestmentValue (double investmentAmount, do numberofYears, int compounded) uble monthlyInterestRate, int (a) You will need to use the pow method in the Math class to do the power function. Its method header is: double Math.pow (double x, double y) (b) You also need to convert the annualPctRate to monthlyInterestRate by dividing the annualPctRate by 1200 You can test this method interactively through Blue investment amount (e.g. 1000), the annual percentage interest rate (e.g. 98), Frequency of compounding, and a number of years (e.g. 10) and writes output as shown below to both the terminal and to a file named "investment.txt" 4. Modify the main method so that it prompts the user to enter the Page 1 of Algorithm Algorithm 1 InvestmentCalculator input amt, annualRate, years, compounded from keyboard print labHeading print "This is your estimated return on your", amt, investment" print columnHeadings monthlyInterestRate- annualRate 1200 count 0 while count Enter starting investment amount: 1000 Enter the number of years 10 Enter interest rate: 9 Enter the frequency of compounding: 12 This is your estimated return on your $1,000.00 investment Year 1 Amount $1,093.81 Year 2 Amount $1,196.41 Year 3 Amount $1,308.65 Year 4 Amount $1,431.41 Year 5 Amount $1,565. 68 Year 6 Amount $1,712.55 Year 7 Amount $1,873.20 Year 8 Amount $2,048. 92 Year 9 Amount $2,241.12 Year 10 Amount $2,451.36 End of program! Name This lab assignment builds on using methods to simplify programming problems Instructions 1. Write your name above. 2. Create a class called InvestmentCalculator. It will have both a main method and a local method called futureInvestmentValue. Before moving on to the next step, be sure to code the main method header and put comments for begin, loop, and end to be completed later method. The 3. Implement and test futureInvestmentValue futureInvestmentvalue method computes the future investment value given an investment amount, an annual percentage interest rate, frequency of compounding (in months) and a specified number of years. The future value is determined based on the following formula: futurevalue = investmentAmount x (1+ monthlyInterestRate) numberofYears frequencyoEcompounding For example, given : investmentAmount = $1000, annua!PctRate 12 (monthly) the 3.25%, and numberOfYears 41 , compounding calculated futureValue is $1,032.99. Use the following method header: static double futureInvestmentValue (double investmentAmount, do numberofYears, int compounded) uble monthlyInterestRate, int (a) You will need to use the pow method in the Math class to do the power function. Its method header is: double Math.pow (double x, double y) (b) You also need to convert the annualPctRate to monthlyInterestRate by dividing the annualPctRate by 1200 You can test this method interactively through Blue investment amount (e.g. 1000), the annual percentage interest rate (e.g. 98), Frequency of compounding, and a number of years (e.g. 10) and writes output as shown below to both the terminal and to a file named "investment.txt" 4. Modify the main method so that it prompts the user to enter the Page 1 of Algorithm Algorithm 1 InvestmentCalculator input amt, annualRate, years, compounded from keyboard print labHeading print "This is your estimated return on your", amt, investment" print columnHeadings monthlyInterestRate- annualRate 1200 count 0 while count Enter starting investment amount: 1000 Enter the number of years 10 Enter interest rate: 9 Enter the frequency of compounding: 12 This is your estimated return on your $1,000.00 investment Year 1 Amount $1,093.81 Year 2 Amount $1,196.41 Year 3 Amount $1,308.65 Year 4 Amount $1,431.41 Year 5 Amount $1,565. 68 Year 6 Amount $1,712.55 Year 7 Amount $1,873.20 Year 8 Amount $2,048. 92 Year 9 Amount $2,241.12 Year 10 Amount $2,451.36 End of program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!