Lab 4 Assignment: -- Automobile Traffic Simulation
COM1101 Winter 2001

(Version of 1/27/2001)

Professor Futrelle
College of Computer Science, Northeastern U., Boston, MA

This page explains what you are to do and turn in for this assignment. The background and details for the lab are in the details page. The lab will take place on Tuesday, January 30th and is due by 4pm on Monday, February 5th.

Overview: You will define a simulation class and a car class. Together they will allow you to simulate simple traffic flow. This must be a multi-file project (Separate Compilation, Savitch, Sec. 8.2) This first lab will focus on API specifications and ADT declarations using a multi-file project. The simulation will be simple, with all cars moving at a single constant speed. In the next lab, Lab 5, you'll extend and refine the simulation, using separate classes for objects such as the road, traffic light, report generator, etc. Also, the cars will interact, possibly leading to traffic jams, collisions, pileups, lawsuits and all that stuff. ;-)

WHAT YOU ARE TO DO AND HAND IN

  1. An API specification for the two classes, simulation and car, as one text file. It should begin with an overview of the project. Of course the API will only list the public member functions, which will be few.
  2. The ADT specifications as two separate files using entirely private member variables and a few public accessor functions.
  3. The implementations as two separate files.
  4. The application file , containing main(), which must be a short program.
  5. Results of your simulation run, as separate files or pasted as comments at the end of your application file.
  6. All files must be in your project folder on your floppy and also included as hardcopy.

EXTRA CREDIT

You will get extra credit for this lab if you develop and implement a way to jazz up your report by generating html instead of plain text. See the details page.