Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Chapter 13, Problem no 6 of Data Abstraction & Problem Solving with C++ (7th Edition). https://www.chegg.com/homework-help/data-abstraction-and-problem-solving-with-c-7th-edition-chapter-13-problem-6pp-solution-9780134463971 Google Drive Link for the files: https://drive.google.com/drive/folders/13BVWz2eHXBAb4OHOAkH7V3N8ZbN0HSyH?usp=sharing The program

Chapter 13, Problem no 6 of Data Abstraction & Problem Solving with C++ (7th Edition). https://www.chegg.com/homework-help/data-abstraction-and-problem-solving-with-c-7th-edition-chapter-13-problem-6pp-solution-9780134463971 image text in transcribed Google Drive Link for the files: https://drive.google.com/drive/folders/13BVWz2eHXBAb4OHOAkH7V3N8ZbN0HSyH?usp=sharing

The program must be coded in C++

TEXT FILE AS INPUT: Must be entered in the same format in InputFile.txt file 1 5 2 5 4 5 20 5 22 5 24 5 26 5 28 5 30 5 88 3

Data Abstraction & Problem Solving with C++ (7th Edition) Chapter 13, Problem 6PP 8kmarks) Show all steps: ON Post a Implement the event-driven simulation of a bank that this chapter described. A queue of arrival events will represent the line of customers in the bank. Maintain the arrival events and departure events in a priority queue, sorted by the time of the event. Use a link-based implementation for the priority queue The input is a text file of arrival and transaction times. Each line of the file contains the arrival time and required transaction time for a customer. The arrival times are ordered by increasing time Enter c Your program must count customers and keep track of their cumulative waiting time. These statistics are sufficient to compute the average waiting time after the last event has been processed. Display a trace of the events executed and a summary of the computed statistics (the total number of arrivals and average time spent waiting in line). For example, the input file shown in the left columns of the following table should produce the output shown in the right y lex Input file Output from pr file on left Simulation Begins Processing an arrival event at time Processing an arrival event at time Processing an arrival event at time Processing a departure event at time Processing a departure event at time: 11 Processing a departure event at time: 16 Processing an arrfval event at time Processing an arrival event at time Processing an arrival event at time Processing a departure event at time: 25 Processing an arrival event at tine Processing an arrival event at time Processing an arrival event at time Processing a departure event at time: 30 Processing a departure event at time: 35 Processing a departure event at time 40 Processing a departure event at time: 45 Processing a departure event at time 50 Processing an arrival event at time Processing a departure event at time: 91 Simulation Ends Abstracti 20 h Edtion ew allsol 28 30 20 24 26 Cheg right Final Statistics: Total number of people processed: 10 Average amount of time spent waiting: 5.6 Step-by-step solution Data Abstraction & Problem Solving with C++ (7th Edition) Chapter 13, Problem 6PP 8kmarks) Show all steps: ON Post a Implement the event-driven simulation of a bank that this chapter described. A queue of arrival events will represent the line of customers in the bank. Maintain the arrival events and departure events in a priority queue, sorted by the time of the event. Use a link-based implementation for the priority queue The input is a text file of arrival and transaction times. Each line of the file contains the arrival time and required transaction time for a customer. The arrival times are ordered by increasing time Enter c Your program must count customers and keep track of their cumulative waiting time. These statistics are sufficient to compute the average waiting time after the last event has been processed. Display a trace of the events executed and a summary of the computed statistics (the total number of arrivals and average time spent waiting in line). For example, the input file shown in the left columns of the following table should produce the output shown in the right y lex Input file Output from pr file on left Simulation Begins Processing an arrival event at time Processing an arrival event at time Processing an arrival event at time Processing a departure event at time Processing a departure event at time: 11 Processing a departure event at time: 16 Processing an arrfval event at time Processing an arrival event at time Processing an arrival event at time Processing a departure event at time: 25 Processing an arrival event at tine Processing an arrival event at time Processing an arrival event at time Processing a departure event at time: 30 Processing a departure event at time: 35 Processing a departure event at time 40 Processing a departure event at time: 45 Processing a departure event at time 50 Processing an arrival event at time Processing a departure event at time: 91 Simulation Ends Abstracti 20 h Edtion ew allsol 28 30 20 24 26 Cheg right Final Statistics: Total number of people processed: 10 Average amount of time spent waiting: 5.6 Step-by-step solution

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_2

Step: 3

blur-text-image_3

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

Databases Theory And Applications 27th Australasian Database Conference Adc 20 Sydney Nsw September 28 29 20 Proceedings Lncs 9877

Authors: Muhammad Aamir Cheema ,Wenjie Zhang ,Lijun Chang

1st Edition

3319469215, 978-3319469218

More Books

Students also viewed these Databases questions

Question

2. Outline the functions of nonverbal communication

Answered: 1 week ago