CS 225 Homework 1
Due at 11:00 AM, Friday, September 1, 2017.
  1. Modify the Counter class so that a counter has an increment. Each time next() is called, the count is incremented by the increment. Add a constructor that takes as arguments the initial value and the increment. The existing constructors should initialize the increment to 1.
  2. Write a class called SymbolGenerator that has a single constructor with a String argument called prefix. Write a method String gensym() that generates a unique string each time it is called that consists of the prefix followed by a number that is incremented by 1 each time. So if gensym() is called 5 times and the prefix is "foo", it will return "foo0", "foo1", "foo2", "foo3", and "foo4".

    Use a Counter object to generate the numbers.

  3. Both the Counter class and the SymbolGenerator class will need appropriate javadoc documentation.