V22.0470 - ASSIGNMENT 3

Write a threaded Java applet that displays an animated boat race between at least three boats on 1 "course".

For this assignment you will build upon the last assignment and the midterm boat design question. You will use a thread to help build an animation--building upon the race applet you did in Assignment 2. The racers will be boats according to the classes in the UML diagram below, you should extend CCompetitor in homework 2 solution to facilitate this (i.e. CBoat extends CCompetitor). You will use the class diagram as a guide to creating your classes (you may need to add some methods and/or variables). Your boats will race from the top of the applet window to the bottom. Once the winner reaches the bottom of the applet window you will alert the user with a victory message stating the winner.

The velocity of a boats depends on the total horsepower of all its motors (if any), and the total height of all its masts (if any) and windspeed (don't worry about wind direction). Windspeed is fixed at 10 units (or knots if you prefer).

  Velocity = (10% of total horsepower + 10% of ( total mast heights * windspeed )) units per second.


Extra Credit: Class Diagram: