Define a PersonalizedGreeter class with a zero-argument constructor and a method access, that work as described below.
As in Assignment 2, each instance of the PersonalizedGreeter greeter class is to be associated with a particular user. The access method is to print a greeting to the console, tailored to the appropriate user. The first time that this method is invoked for a particular object, the greeting is to be a String consisting of the capitalized word "Welcome", followed by a comma and a space, followed by the user's name, followed by an exclamation point. The second and subsequent times the method is invoked on an object, the greeting is to be the same as the first time, except that it is to begin with "Welcome back" rather than simply "Welcome". In both cases, the entire greeting is to appear on a single line.
Note that in order for an object to determine the appropriate greeting, it is not necessary to keep track of how many times the access method has been invoked on the object, or even to use a boolean value to keep track of whether the object has been accessed before. All that is needed is for both the constructor and the access method to determine which greeting is to be used for later invocations of the access method.
The constructor is to prompt for and read the user's name from the keyboard. As in Assignment 2, the constructor need not check the user's name for appropriateness.
You are to turn in hard and soft copies of your class definition, as well as a hard copy of the results of testing your class with the test class PersonalizedGreeterTester with the user names Alice, Bob, Kim, and Lee. The test class is available on the class web site.