Exercise 2.1 Create a class Person: with last name, first name, and age. Use the sample code for implementing ChBalloonInput interface and input iterator as a model for this set of tasks:
Design the class PersonView which allows the user to view and input the information about one Person object.
Define the ChPersonInput modelled after ChBalloonInput interface, and implement the ChGUIReadPerson and CHConsoleReadPerson classes. Make sure the age is within the 0-150 range.
Implement the InGUIRange and InConsoleRange classes for the Person class input. Again, make sure the age is within the 0-150 range.
Exercise 2.2 Following the same strategy as in exercise 2.1 design a GUI to represent and allow for user input of a series of two integer coordinates that represent one Point in the range from 0 to 400. Implement also the iterator for reading the data from the console. Use it to read in the values of the coordinates of a Polygon. Read the Graphic in Java mini-tutorial and look up the JavaDocs for Polygon - to actually paint a polygon of the color of your choice in the graphics window, at the completion of the input.
Exercise 2.3 Read the MiniPaint tutorial to figure out how to implement InMouseRange class, which will allow the user to input the Polygon data via mouse clicks.