Lab 5 Post-Lab Assignment: A Dart Class
Due Friday, October 6, 2006

Write a Dart class that represents a graphical dart object (represented by an "X" as we did in lab 3). The attributes of the dart will be its position (the x and y coordinates of the center - where the two lines in the X intersect - this is probably different from what you did in lab) and color. Hence, the class should store the following information as instance variables: Your Dart class should provide the following methods:

When your Dart class compiles, write an applet DartBoard that does the following:

Of course, you also need an html file so you can run the applet. In the html file make the applet width 400 and height 400 (use constants!). SUGGESTION: First just get your dartboard drawn in your applet then go back and add the darts.

Be sure your program is appropriately documented.

Hand-in: Hard copy of your Dart class and your DartBoard applet. Also tar your post lab directory that contains all of your files (.java, .class, and .html) and email the tar file to your instructor with cpsc120 post5 in the subject line.