Programming Problem 6 and 7 on Page 413-414. Remember that Section 13.4 provides details of how to implement simulations.
Note that, problem 7 has three variations of queues that are small modifications to the previous one.
Implement both the array and linked list version of the data structures.
Randomly generate 99,999 events with a random start time from the same range (i.e., from 0 to 100,000) and a duration in the range of 1 to 100 to be used as the input to the simulation. Note that the input file should be the same when different queue methods are compared.
You should first generate 99,999 random values for event start time (from a range of 0 to 100,000) and then sort them. Then, for each you can independently determine how long the event is for (random value from range of 1 to 100). These values should be written into a file that will be later read by simulator.
The following output should be provided for an average of 10 simulations for each of the simulation in a table:
Note: You can only use (i.e., copy) code from the book and slides. You need to develop the rest of the code yourself.
Deliverables: (as source code or a doc or pdf file)
Teaching Assistant: Iman Vakili
What to turn in: A softcopy of your sourcecode and reports should be uploaded to WebCampus. Combine the files in a single zip file.