CS206 Data Structures
Programing Assignment#3
Due on Tuesday, February 27, 2007
Problem: Implement the printer queue simulation from Chapter 2 of your text. Then do the following:
- As suggested, run the simulation several times for simulation(3600, 10) and simulation(3600, 5). What happens when the number of jobs waiting after 1 hour is zero? Fix the program to accomodate this.
- Enhance the program to also print out: the total number of jobs scheduled, processed to completion, and the total time the printer was busy printing.
- Suppose the likelihood of students printing in any given hour increases from 2 to 4. Run the simulation again (for the same parameters as in (1) to see what happens.
- Given the situation in (3), what would happen if an additional printer was added to the lab? Modify the program and run the simulation again.
Suppose you were asked to explore this problem by the Department Chair, using the results you obtained, write a short report with your recommendations, justifying your recommendations by using the results from your simulations.
Hand in a printout of your final program. Highlight all the changes you made for the above questions. Include a prinout of sample runs from (2), (3), and (4).
Back to CS206 Materials