Class DriversEd

java.lang.Object
  extended by DriversEd

public class DriversEd
extends java.lang.Object

This class serves as the driver :) for the Drivers' Ed project found here. The only method (main) instantiates an Annex object to provide the City context before adding three Runnable StudentDriver objects (Curly, Larry & Moe) who display their driving skills as they navigate the Annex. Each StudentDriver constructor is supplied with,

  1. the City context: an instance of the Annex class
  2. a random (int) street between 0 and 2 inclusive
  3. a random (int) avenue between 0 and 2 inclusive
  4. a random initial direction
  5. a random (int) amount of fuel, between 10 and 50 liters inclusive
  6. a random (double) speed between 1.0 and 2.0 moves per second
  7. their unique name (use Curly, Larry, and Moe)
  8. an image file name for their icon (Curly:RedCar.gif, Larry:GreenCar.gif, Moe:BlueCar.gif)

Author:
Chris Darcy

Constructor Summary
DriversEd()
           
 
Method Summary
static void main(java.lang.String[] args)
          The main method instantiates an Annex object to provide the City context before adding 3 Runnable StudentDriver objects (Curly, Larry & Moe) who display their driving skills as they navigate the Annex.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DriversEd

public DriversEd()
Method Detail

main

public static void main(java.lang.String[] args)
The main method instantiates an Annex object to provide the City context before adding 3 Runnable StudentDriver objects (Curly, Larry & Moe) who display their driving skills as they navigate the Annex. Each StudentDriver constructor is supplied with,
  1. the City context: an instance of the Annex class
  2. a random (int) street between 0 and 2 inclusive
  3. a random (int) avenue between 0 and 2 inclusive
  4. a random initial direction
  5. a random (int) amount of fuel, between 10 and 50 liters inclusive
  6. a random (double) speed between 1.0 and 2.0 moves per second
  7. their unique name (use Curly, Larry and Moe)
  8. an image file name for their icon (Curly:RedCar.gif, Larry:GreenCar.gif, Moe:BlueCar.gif)
Finally, each StudentDriver object is placed on its own Thread, prior to launch.

Parameters:
args - parameters passed from the O/S.