CSE 341 - Spring 2002 - Assignment 3 - Java Warmup Part 1

Due April 22, at the beginning of class. Please submit all of your class definitions in one code file.

  1. This assignment is intended to provide a modest introduction to Java, graphics in Java, and inheritance.

    Write a java class DrawCircles that creates an interesting picture on the screen by drawing circles of random sizes, locations, and colors. (If you are so inclined, you can add other graphic elements to make a more elaborate picture, but only circles is enough.)

    You should also include two control buttons: 'draw' and 'quit'. Draw erases the screen and draws another random picture; quit exits the application. The other parameters for the picture (the minimum and maximum sizes for the circles, and the number of circles) should be obtained using a method defined in the class DrawCircles, which returns some suitable default values for these.

    Before you start programming this assignment, please also look at Assignment 4 for next week, which involves extending the DrawCircles class -- you should write your DrawCircles class not only to satisfy this assignment, but also to facilitate extension, as needed for the next assignment.