Programming Assignment 2
Date Due: September 27, 2000
Design and implement an applet that draws 100 circles of random color and random diameter in random locations. Ensure that in each case the entire circle appears in the visible area of the applet.
You must at least do the following things for this program to receive full credit:
Use constants for screen dimension measurements and the number of circles to draw.
Use the Random class mentioned in chapter 2 (hint – use the modulus operator to set a limit on your random number).
The assignment must be an applet, not an application, with your class name being your lastname, all lowercase. For example, the first line of a program I did would be
public class kappers extends Applet
You must use some form of loop from chapter 3.
Comment your code!!
Turn in a hard copy (print out) of your program to me in class the night the program is due. You must also send your program to me electronically, to my email address (kathleen@cs.ucf.edu). The subject line of your program should be Assignment #2 – emails without this subject will be returned. This is so I can distinguish them from questions you may have. You will be emailing me both a .java file and a .html file, so that I can compile and run them on my own. Do NOT just send me an html file or a url link – I need to be able to compile your code.
Be sure to name your class, your .java file, and your .html file all the same name as your lastname, all lowercase!!
I will be grading your programs with the javac compiler, but will make the necessary adjustments if you wrote your program using JBuilder. Be sure your program compiles on one of these compilers before sending it to me.