Excerpt from Description of Exercise

Objective: To gain more experience using recursion and recursive data structures.

You will be implementing a simple drawing program we call ``Scribbler.'' A sample of what your program's interface might look like is shown below.

The Scribbler program has three modes: Draw mode, Move mode, and Color mode. The modes behave as follows:

Draw mode:
As the user drags the mouse around in the canvas, the program will draw lines following the path of the mouse.
Move mode:
In the mode, the user can reposition a scribble by pressing the mouse while touching some part of the scribble and then dragging the scribble to its new location.
Color mode:
Clicking on any scribble while in this mode should change its color to that selected in the color menu.
The program starts in Draw mode. Draw mode, Move mode, and Color mode are selected by pressing buttons, and the color used by Color mode is selected by choosing a color from a JComboBox filled with color names.

The program also has an ``Erase Last'' button that will erase the most recently drawn scribble. Pressing the button repeatedly will erase scribbles in the reverse order of which they were drawn.

Handouts Describing the Exercise

Student Resources for Lab Exercise

Sample solutions