Assignment 2 - Assignment 2(if you cannot do this assignment you will most likely fail the course Part 1 of 2 Write an inflation calculator Input should

Assignment 2 - Assignment 2(if you cannot do this...

This preview shows page 1 out of 1 page.

Assignment 2 ( if you cannot do this assignment you will most likely fail the course ): Part 1 of 2: Write an inflation calculator. Input should be amount, rate of inflation and number of years. Output should be the future value of the amount. This assignment is designed to test your ability to write a simple loop. Example Output: --------------------Configuration: <Default>-------------------- Enter the current cost of the item: 1000 Enter the expected inflation rate per year (Enter as a percentage and do not include the percent sign): 6 Enter the whole number of years in the future to project cost: 10 At 6.00% inflation per year, the cost in 10 year(s) will be $1,790.85. Process completed. Part 2: Write a counter class in its own file. This will allow your counter to be used by any program. The counter must be able to increment and decrement by one. It must never go below zero. toString and equals must be implemented and tested correctly. (toString and equals are covered in depth in your text) System.out.println("”+c1) must work and if(c1.equals(c2)) must work where c1 and c2 are instances of your counter.
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Fall '15
  • KennethMoore
  • Inflation, Equals sign, 10 year, 6.00%, $1,790.85

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture