Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Cashier's Office: Mean student wait time: 0 tick(s) Mean window idle time: 10 tick(s) Longest student wait time: 0 tick(s) Longest window idle time: 10 tick(s) Financial Aid Office: Mean student...

1 answer below »
Cashier's Office:
Mean student wait time: 0 tick(s)
Mean window idle time: 10 tick(s)
Longest student wait time: 0 tick(s)
Longest window idle time: 10 tick(s)
Financial Aid Office:
Mean student wait time: 0 tick(s)
Mean window idle time: 6 tick(s)
Longest student wait time: 0 tick(s)
Longest window idle time: 6 tick(s)
Registrar's Office:
Mean student wait time: 0.8 tick(s)
Mean window idle time: 4 tick(s)
Longest student wait time: 4 tick(s)
Longest window idle time: 4 tick(s)
Number of students waiting over 10 minutes across all offices: 0 tick(s)
Number of windows idle for over 5 minutes across all offices: 2 tick(s)

1
1
1
1
3
5 1 2 R C F
5 1 2 F R C
5 1 2 C F R
9
2
4 2 6 R C F
4 0 0 R C F

The Assignment
Imagine that the student services center (SSC), which houses the registrar, cashier, and financial aid office, has approached you with the following issues.  At certain times during the day, students a
ive in large numbers, each needing to visit one or more offices.  If there are not enough windows open at each, the average student wait times are too long, and they receive many complaints.  On the other hand, if they open too many windows, their staff will be idle for most of the time, and they will be wasting money.  They want you to program a simulation that will allow them to calculate metrics on student wait times and window idle times given a specific traffic flow of students through the SSC.
The Simulation
Sample Input File
1
1
1
1
3
5 1 2 R C F
5 1 2 F R C
5 1 2 C F R
9
2
4 2 6 R C F
4 0 0 R C F
END
Sample Output File
Cashier's Office:
Mean student wait time: 0 tick(s)
Mean window idle time: 10 tick(s)
Longest student wait time: 0 tick(s)
Longest window idle time: 10 tick(s)
Financial Aid Office:
Mean student wait time: 0 tick(s)
Mean window idle time: 6 tick(s)
Longest student wait time: 0 tick(s)
Longest window idle time: 6 tick(s)
Registrar's Office:
Mean student wait time: 0.8 tick(s)
Mean window idle time: 4 tick(s)
Longest student wait time: 4 tick(s)
Longest window idle time: 4 tick(s)
Number of students waiting over 10 minutes across all offices: 0 tick(s)
Number of windows idle for over 5 minutes across all offices: 2 tick(s)
You will model the above problem to meet the SSC’s requirements.  As students a
ive in the SSC, they will go to one of the offices they need to visit, and 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. They will then move onto the next office they need to visit, and repeat the process until they have completed all their tasks.  Your first job will be to build a generic doubly-linked list data structure, from scratch, supporting the usual operations, which we have largely completed in class.  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 C++ STL li
aries.  You will then use your queue implementation to implement the simulation.
Input will be in the form of a command line argument that specifies the location of a text file.  The text file will define at what times students a
ive, and what offices they will visit and in what order. It will have the following format. The first line will be the number of windows open at the registrar. The second line will be the number of windows open at the cashier. The third line will be the number of windows open at the financial aid office.  The next line will be the time (or clock tick) at which the next students a
ive.  The next line will be the number of students that a
ive at that time.  The following lines will be the amount of time each student needs at the registrar, cashier, and financial aid office, respectively, as well as the order they visit them. This is followed by the next clock tick, number of students, etc.  For example, and input of:
2
3
1
1
2
5 1 2 R C F
10 5 1 F R C
3
1
4 2 6 R C F
END
Means that 2 windows will be open at the registrar, 3 at the cashier, and 1 at the financial aid office.  At time 1, 2 students a
ive.  The first will need 5 minutes at the registrar, 1 minute at the cashier, and 2 minutes at financial aid, in that order. The second student will need 10 minutes at financial aid, 5 minutes at the registrar, and 1 minute at the cashier, in that order.  Then, at time 3, 1 student a
ives and needs 4 minutes at the registrar, 2 minutes at the cashier, and 6 minutes at financial aid.
When students a
ive at the same time and visit the same office first, assume that the student listed first in the text file is also the first to get into line. If 2 students finish at different offices at the same time and head to the same office next, assume that they enter the line based on alphabetical order of the office they are coming from (eg. cashier always beats financial aid which always beats registrar).
The simulation will start at time 1, and run until all student requests have been addressed, meaning the queue at each office is empty and no more students are going to a
ive.
At the end of the simulation, your program will display (on standard out) the following (labeled) metrics:
1. The mean student wait time for each office.
2. The longest student wait time for each office.
3. The number of students waiting over 10 minutes total across all offices.
4. The mean window idle time for each office
5. The longest window idle time for each office
6. Number of windows idle for over 5 minutes across all offices.
The Design
Your simulation will consist of the following classes (bolded classes are required):
· DblList - the doubly linked list template class
· ListQueue - the list-based queue template class
· ServiceCenter - models the service cente
· Office - models an individual office in the service cente
· Window - models a single window in one of the offices
· Customer - models a student coming into the service cente
· Any other classes you want to create for the simulation
You should also provide a main.cpp to run the program, which takes the input specification file as a command line argument.
Must be contained the below files
· Main.cpp
· DblList.h
· ListQueue.h
· ServiceCenter.h
· ServiceCenter.cpp
· Office.h
· Office.cpp
· Window.h
· Window.cpp
· Customer.h
· Customer.cpp
· Input.txt
· Output.txt
Rules of Engagement
· You may NOT use any non-primitive data structures other than what we have implemented in class. You may not use any data structures from the C++ STL. Of course, to do the file processing you may use any of the standard C++ IO classes.
· For this assignment, you may work in groups of AT MOST 2 students.
· Develop using VSCode and make sure your code runs co
ectly with g++ using the course docker container.
· Feel free to use whatever textbooks or Internet sites you want to refresh your memory with C++ IO operations, just cite them in a README file turned in with your code. All code you write, of course, must be your own. In your README please be sure to include the g++ command for compiling your code.
Grading
Grades will be based on co
ectness, adherence to the guidelines, and code quality (including the presence of meaningful comments).  An elegant, OO solution will receive much more credit than procedural spaghetti code.  I assume you are familiar with the standard style guide for C++, which you should follow.  (See the course page on Canvas for a C++ style guide and Coding Documentation Requirements.)
Code that does not follow the specification EXACTLY will receive an automatic 25% deduction. Code that does not compile will receive an automatic 50% deduction.
Answered 14 days After Mar 21, 2023

Solution

Aditi answered on Mar 29 2023
28 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here