Your instructor will assign one or more of the following problems. Submit all appropriate files for grading, including code files, screen captures, supplemental files (e.g., image files), and text files.

  1. Create a composite figure of some sort (other than the figures we have created in the text, lecture or lab) that the user can drag around using the mouse. Your solution should satisfy the following:

    1. Include a method that draws your figure given x and y coordinates.
    2. The figure should include multiple geometric elements (your instructor will indicate whether it may include bitmap image or font elements).
    3. Your program should initially draw the figure in the center of the output panel.
    4. As the user drags the figure around, traces of the figure’s previous locations should slowly fade away. Note: If you use a white background a faint grey shadow may remain. Hint: See section 4.3.3 in the text.

  2. Modify the Pac-Man example from the text to produce both Pac-Men and Ms. Pac-Men.

  3. Write a program that displays 4 copies of Larry the Cucumber. Your solution should include a method that draws Larry given x and y coordinates. Extra Credit: Make Larry's eyes shake with energy proportional to the distance from Larry to the current mouse position. See an example below.

Checking In

Submit all appropriate files for grading, including code files, screen captures, supplemental files (e.g., image files), and text files. We will grade this exercise according to the following criteria:

If you work in teams for this homework assignment, be sure to submit all team members’ names in the code documentation.