Purpose:            Undertake a requirements analysis and write a prototype of a system.

Due:                Writeups: Beginning of class on March 5, 2007

Prototype: 11:59 PM on March 10, 2007, using the turnin script. Late submissions will not be accepted.

Description:     For this iteration, you will prepare a requirements analysis for the traffic simulator and produce a prototype.

 

First, prepare a set of use cases for the traffic simulation system. Identify all possible cases, and list them. Then, write out each use case, completing each section to the greatest extent possible. It is important to consider all possibilities. Next, prepare class diagrams with appropriate associations for all classes in the system. Finally, describe how you will store a street layout, including intersection information.

 

Submit these items at the beginning of class next week. No handwritten copies of use cases or layout explanations accepted. Class diagrams may be handwritten, but must be very neat. Boxes must be drawn with a straight edge.

 

Next, implement the necessary classes and write an application to run a simple version of the system that permits an object in the Vehicle hierarchy to traverse a layout and produce a minimal report. Select one of the three Vehicle subtypes at random, have it traverse a layout from a given starting point to a specific destination, and report the time required. Permit multiple vehicles (query the user for another Vehicle) and print a max, min, and average when the user indicates they are done. Follow your class diagram for these object-types.

 

Notes:

·        You may (probably?) need to update the Vehicle class (and maybe its subclasses) to handle the traversal.

·        All classes should be designed first using a class diagram, and then implemented. If you change a class design during implementation, note the change(s) in a readme.

·        Your layout must have at least 25 intersections.

·        Proper documentation and style is expected. The application must be modularly designed.

 

Turnin:

Writeups: 6 PM March 6, 2007

Prototype: 11:59 PM, March 10, 2007. Turn in all code files, a makefile, and data file(s). You may also submit a readme. The makefile must build an executable named p2.