Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You need to write two classes for this problem. Name them Investment and InvestmentTest. The associated java files should be Investment.java and InvestmentTest.java. Make sure

You need to write two classes for this problem. Name them Investment and InvestmentTest. The associated java files should be Investment.java and InvestmentTest.java. Make sure the two java files are saved at the same location on your computer.

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 rate) 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.

The Investment class should contain two methods. 1. futureInvestmentValue () 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.pow(1 + monthlyInterestRate, years * 12) Note that monthlyInterestRate = annualRate / 12 2. printFutureValueTable () print the future value table for 30 years.

Design the printing layout as close of the above example, for 30 years.

All the programming style and compiling requirements apply.

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

Students also viewed these Databases questions

Question

What types of conditions do municipal laws cover?

Answered: 1 week ago

Question

Question What is a secular trust?

Answered: 1 week ago