A2Greeter that works just like the A1Greeter class of Assignment 1, except that
changeGreeting method that takes a String argument and changes the object's greeting to that given string,
greet method prints a message of the form
greetings to visitor number 123where "greetings" is replaced by the correct greeting for that particular object, and "123" is replaced by the number of times that the
greet message has been sent to that object. Note that this means that you will need to create and maintain a counter for each object.
If you want, you may use my posted solution to Assignment 1 as the basis of your solution to Assignment 2. As always, you should credit any person whose work you use.
Test your class definitions with the code in the file A2.java, which is available on the class web site. The rules for what to turn in are the same as for Assignment 1 (except of course that the filenames are different).