Smiley Assignment
In one class, create a smiley face that is between 40 to 50 pixels in diameter.
- Create 6 different eyes (eg. wide, narrow, closed, normal etc)
- Create 6 different mouths
- Create 6 different eyebrows.
- Make a constructor that randomly generates 3 numbers between one and six.
One of these numbers will choose the eyes that the smiley will have, another
the mouth and the final one the eyebrows.
- Make a method that draws the smiley face at a given pair of co-ordinates.
In another class, create the interface.
- Generate 25 smiley faces. Draw them in groups of 5 on the screen.
- Due to the random numbers in the constructor, each face will look different.
Steps:
- Draw the UML.
- Create the smiley face pieces in a working program. Make sure that the face
will be betwen 40 and 50 pixels. Work out all of the co-ordinates that you
will use.
- Create the smiley object.
- Create the user interface object.
- Submit your UML and your fully commented code.
Example:

- Face one is the base
- Face two changes the mouth only.
- Face three changes the mouth (as in two) and the eyes.