Programming Homework Help

Dallas College Eastfield Campus Create a Program Code Java Coding Task

Get Your Custom Essay Written From Scratch
We have worked on a similar problem. If you need help click order now button and submit your assignment instructions.
Just from $13/Page
Order Now

Problem Description:

Write a program in Java that reads in: (i) investment amount, (ii) annual interest rate, and (iii) number of years from the keyboard and calculates the future investment value using the following formulae:

h = × 12

h = 1200

= × (1 + h )!”#$%&'()*!+,-

Sample Run:

Enter investment amount: 1000
Enter annual interest rate in percentage points (e.g., 2.25 for 2.25%): 2.25 Enter the number of years: 2
The value of $1000.0 after 2 years is $1045.9837866210664

Hints:

  1. ImporttheScannerclassfromthejava.utilpackagetoreadthethreeinputvariables.
  2. Declare variables as “double” or “int” appropriately.
  3. UsetheMath.pow(a,b)functiontocompute !.
  4. Use the sample run in the instructions to test your program to make sure it is correctbefore you submit.

Deliverables:

Your .java file including:

  1. Asamplerunatthetopwithinvestmentamountof$2021.50,annualinterestrateof 3.5%, and 6 years. The four lines of the output (similar to those shown in the sample run above) should be inserted as a comment on the top of the Java code (before the import and class statements). (2 points)
  2. Your code with other appropriate comments. (Code: 6 points, Comments: 2 points)