Sale!

CS 162 Module 3 solved

Original price was: $35.00.Current price is: $28.00. $23.80

Category:

Description

5/5 - (10 votes)

Goals

Use containers from the STL
This module builds on a previous module but is not part of the cumulative modular program.
Save a copy of the previous module so you have a known place to start in case of
catastrophe! Design your changes. Review the design. Then, and only then, start coding!
In Module F you implemented a simulation of a traffic intersection using queues to hold the cars. You
will replace the queue you wrote and use the queue container from the STL.
You will run both programs with identical settings. Compare the results. Are they consistent?
They won’t be identical but should be within range of each other.
Is there a simple modification you can make to ensure they are doing the same calculations
correctly? HINT: it involves the seed.
NOTE: De-allocate memory as appropriate.
Grading
Modules will be graded S/U. As part of the cumulative modular program (Cump2) this module
will contribute to that numeric score. These criteria are given for reference.
Programming style- 10%
STL containers – 30%
Create all four (for each direction)
Correctly implement add()
Correctly implement remove()
Modify the arrival function to use the STL container toput “cars” in the queue using the timestamp
– 20%
Modify the departure function to STL container to take “cars” from the queue – 20%
Correctly calculate the average wait time for each direction of travel – 20%