Write a program that draws 750 non-overlapping randomly chosen circles, with diameters between 5 and 25, in a graphics window that is 500 pixels by 500 pixels. Here is a demonstration of what your final program should do. To help you get started, here is a simple graphics program that draws a single random circle for each click of the button. You can do your assignment by adding code to this outline.
Notice that a randomly chosen circle has three parameters, two locations coordinates and a diameter (make sure that your non overlapping circles have their centers within the borders of the window). Your program will need to keep track of the non-overlapping circles that it has generated up to a certain point. Do this by storing the data for a circle in an object of type
You will need to define the class This assignment is due Friday, November 10. |