Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

http://www.filedropper.com/mailroomtest The mailroom in the Usdan Student Center

ID: 669742 • Letter: H

Question

http://www.filedropper.com/mailroomtest

The mailroom in the Usdan Student Center is very busy. Many students walk by it on their way to class in the hopes of picking up their packages. However, sometimes the line is too long for the student to wait, and they must forgo waiting in line in order to get to class on time. Your task is to create a model of this behavior and calculate the average waiting time per student. You must implement a queue using arrays. For the purpose of this problem, you must make a few assumptions: It takes 5 units of time for the student being served to receive their packages. A maximum of 10 students can wait in line to collect their packages. If the line is already full and a student arrives at the mailroom, the student will permanently leave. If the line later becomes not full and a different student arrives, that new student will join the line. o Problem: Given the arrival times at the mailroom, calculate the average waiting time per student. Arrival times will be provided as a text file of integers. The first integer in the file is the arrival time of the first student to get their package, the second integer is the arrival time of the second student... the nth integer is the arrival time of the nth student. Your code must support input of arbitrary size. That is, the input file may have any number of arrival times in it. Your program should look like this (underlined is user input): Usdan Mailroom Simulation: Please specify the input file: MailroomTest.txt Here are the results of the simulation: Average waiting time: 49

Explanation / Answer

Link is not downloadable.