Help with Pg 172 #2 interest (using a main routine and one method for calculating interest on a given balance with a given interest rate)

Step #1:
Create a new class called InterestTable
Create a new method called calcInterestAmt
Use these comments:
// When Investment amount is 3000 and rate is .065 answer should be 195
// When Investment amount is 5 and rate is .065 answer should be .325
// When Investment amount is 3000.99 and rate is ..1 answer should be 300.099
The input parameters:
  • Double Investment Amount (ex: 3000)
  • Double Interest Rate (ex: .065)
The output parameter is:
  • Double Interest Amount
Process
  • return the investment amount * the interest rate
Compile and verify that this works with all the test cases in the comments.
To verify, right click on the calcInterestAmt method
 
Step #2:
Add a new method in InterestTable called test to do the following:

Step 3:
Add a new method in InterestTable called printOneYearInterest.
Use these comments:
// When  you receive in 1990, 2900.99, 100, .065 it should return 3195.099 and print :
//   1990 2900.99 100 195.099 3195.099
// When you receive in 2000, 5, 0, .065 it should return 5.325 and print:
//    2000 5      0     .325 5.325
 
The input parameters:
The output parameter:
Process
Run the test cases by right clicking on the printOneYearInterest method

Step 4:
Change the main method to print a table:
Add a print line to print the headings :
Call the method printOneYearInterest giving it : 2007 as the year, 1000 as the last amount, 0 as the new investment, and  capture the end of year amount returned in a variable called endAmt.
Loop 24 times always calling printOneYearInterest, giving it:
Test this by running the main routine. You should see a table with 25 lines.