{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CMPSCHWK6 - the final queue contents the number of landings...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
75 points (Adapted from Text chapter 6 programming project 4) Write a program that simulates the operation of a busy airport that has only 2 runways to handle all takeoffs and landings. You may assume that each takeoff or landing takes 15 minutes to complete. One runway request is made during each five-minute interval, and the likelihood of a landing request is the same as for a takeoff request. Priority is given to planes requesting a landing. If a request cannot be honored, it is added to a takeoff or a landing queue. Your program should simulate 120 minutes of activity at the airport. Each request for runway clearance should be time-stamped and added tto the appropriate queue. The outputs of your program should include
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: the final queue contents, the number of landings and takeoffs completed, and the average number of minutes spent in each queue. Use a uniform random number generator to determine if a request is a landing request or a take-off request. See http://www.cplusplus.com/reference/clibrary/cstdlib/rand/ for information on the basic C++ random number generator function rand. You MAY use STL data structures in the work. Extra credit ( 20 points ) Instead of scheduling requests at a fixed five-minute interval, use a random number to determine the interval between takeoff or landing requests. Use an exponential random number for the interval. Show how the performance between this model and the base model differ....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online