next up previous
Next: Draw a better target Up: Assignment 5: Moiré patterns Previous: Setup

Draw a target

1.
Write a method called paintTarget with the following prototype:
public void paintTarget (Graphics g, int width, int height)

Once again, width and height are the width and height of the screen. paintTarget should invoke paintCircle four times, creating circles with diameters 100, 200, 300 and 400.

2.
In paint, don't invoke paintCircle directly. Invoke paintTarget instead.



Allen B. Downey
3/3/1998