Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Specifics You will model the above problem to meet the registrars requirements. As students arrive in the registrars office, they will wait in a

The Specifics You will model the above problem to meet the registrars requirements. As students arrive in the registrars office, they will wait in a queue. When a window becomes available they will exit the queue and remain at the service window for however long they need. Your first task will be to build a generic doubly-linked list data structure, from scratch, supporting the usual operations. You will then use this linked list to build a generic queue data structure, supporting the usual operations. You may not use a queue or linked list from the STL libraries. You will then use your queue implementation to finish the problem. (Note that in the spirit of reusability, you should have 3 classesone for the list implementation, one for the list interface (pure virtual base class) and one for the queue. Of course, youll need additional classes to model the rest of the assignment.) Input will be in the form of a command line argument (./myprog test.in) that specifies the location of a text file. The text file will define at what times students arrive, and will have the following format. The first line will be the number of windows open. The next line will be the time (or clock tick) at which the next students arrive. The next line will be the number of students that arrive at that time. The following lines will be the amount of time each student needs at a window. This is followed by the next clock tick, number of students, etc. For example, and input of: 5 1 2 5 10 3 1 4 Means that 5 windows will be open. At time 1, 2 students arrive. One will need 5 minutes at a window, and the other 10. Then, at time 3, 1 student arrives and needs 4 minutes at a window, etc, etc. When students arrive at the same time, assume that the student listed first in the text file is also the first to get into line. In the above, at time 1 there will be 2 students that arrive. The student requiring 5 minutes will get into line before the student requiring 10 minutes. The simulation will start at time 0, and run until all student requests have been addressed, meaning the queue is empty and no more students are going to arrive. (This should tell you the main body of the program is going to be a huge loop.) At the end of the simulation, your program will display (on standard out) the following (labeled) metrics: 1. The mean student wait time. 2. The median student wait time. 3. The longest student wait time. 4. The number of students waiting over 10 minutes 5. The mean window idle time 6. The longest window idle time 7. Number of windows idle for over 5 minutes.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago