Work on this exercise by yourself, but be quick to ask questions of your instructor, student assistants and classmates as desired.
Consider: Checking out JavaEyes changed your Package Explorer view. (It may also have changed your Problems view, since JavaEyes intentionally has some errors.) How is your Package Explorer view different than it was before you checked out the JavaEyes project?
Before continuing, make sure that you understand how to use Quick Fix. Ask questions as needed.
Consider: How many classes are in the JavaEyes project?
Consider: How many constructors does the Eye class have?
Consider: How many other methods does the Eye class in JavaEyes have?
Consider: How many fields does the Eye class have?
Consider: In Eclipse, do you need a separate “build” or “compile” step before you run?
Consider: What Exception (error) occurred, according to the error message?
Consider: At what statement did the Exception (error) occur, according to the error message?
Remember, in all your code:
Here is the grading rubric for this assignment.
Consider: Suppose that you want to add a 3rd eye that behaves just like the other two eyes. What change(s) to the design are necessary? That is, what change(s) must you make to the UML class diagram to reflect the addition of a 3rd eye?
This part of JavaEyes showed you that you can implement different kinds of Eyes by using fields -- in this case, fields for the Eye's color and the color of the Eye's Eyeball. You construct different kinds of Eyes by using the two-parameter constructor that lets you specify these colors when the Eye is constructed.
Consider: Suppose that you want to implement square Eyes (i.e., Eyes that are drawn as squares instead of as ovals). How could you do this? (Just this about this; you do not need to implement this, although it is not hard to do so.)