Intro to Java Exercise: (Attached FutureValueApp.java)

profileadelen
 (Not rated)
 (Not rated)
Chat

 Intro to Java Exercise:
(Attached FutureValueApp.java)

1) Start a new class named Validator in the same package as the FutureValueApp class.

2) Move the getDouble, getDoubleWithinRange, getInt, and getlntWithinRange methods from the FutureValueApp class to the Validator class.

3) Change the name of the getDoubleWithinRange method to getDouble, and change the name of the getlntWithinRange method to getInt. This overloads the getDouble and getInt methods.

4) Modify the FutureValueApp class so it uses the methods in the Validator class.

5) Start a new class named FinancialCalculations and save it in the same package as the other classes. Then, move the calculateFutureValue method from the FutureValueApp class to the Financia1Calculations class, and make sure that the method is public.

6) Modify the FutureValueApp class so it uses the static calculateFutureValue method that's stored in the FinancialCalculations class.

7) Then run application to make sure it works.

    • 11 years ago
    the answer
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      new569.zip