Question: test-input: 1 Washington 1 8 2 Adams 2 9 3 Jefferson 2 10 4 Madison 2 6 2 Monroe 3 7 1 QuincyAdams 4 5

 test-input: 1 Washington 1 8 2 Adams 2 9 3 Jefferson 2 10 4 Madison 2 6 2 Monroe 3 7 1 QuincyAdams 4 5 1 Jackson 5 6 5 VanBuren 5 12 2 Harrison

6 1 5 Tyler 9 3 1 Polk 9 6 4 Taylor

test-input:

1 Washington 1 8 2 Adams 2 9 3 Jefferson 2 10 4 Madison 2 6 2 Monroe 3 7 1 QuincyAdams 4 5 1 Jackson 5 6 5 VanBuren 5 12 2 Harrison 6 1 5 Tyler 9 3 1 Polk 9 6 4 Taylor 11 6 3 Fillmore 12 5 2 Pierce 15 3 5 Lincoln 16 16 1 Buchanan 17 1

test-output:

1 Washington begins 1 2 Adams begins 2 3 Jefferson begins 2 4 Madison begins 2 5 VanBuren begins 5 4 Madison ends 8 1 Washington ends 9 1 QuincyAdams begins 9 2 Adams ends 11 2 Monroe begins 11 4 Taylor begins 11 3 Jefferson ends 12 3 Fillmore begins 12 1 QuincyAdams ends 14 1 Jackson begins 14 3 Fillmore ends 17 4 Taylor ends 17 5 VanBuren ends 17 5 Tyler begins 17 2 Monroe ends 18 2 Harrison begins 18 2 Harrison ends 19 2 Pierce begins 19 1 Jackson ends 20 1 Polk begins 20 5 Tyler ends 20 5 Lincoln begins 20 2 Pierce ends 22 1 Polk ends 26 1 Buchanan begins 26 1 Buchanan ends 27 5 Lincoln ends 36

1 Problem description Main objective: Simulate 5 Bank Teller lines, similar to the single Bank Teller line that we discussed in class, which is also described in Chapter 8 of the P&C textbook. Customers come into the SlugFest Bank, and they wait on one of the Teller lines. Each input line contains the name of the customer (with no spaces in that name), the number of the Teller line that the customer waits on (from 1 to 5), the arrival time for the customer, and the number of minutes that the customer's banking transaction takes. Arrival time for a customer is just the number of minutes since the simulation started that the customer arrived. For example, the input line 4 Jefferson 25 8 means that customer Jefferson arrives 25 minutes after the simulation started, waits on Teller 4's line, and has a banking transaction that takes 8 minutes But that doesn't mean that Jefferson gets to begin her transaction at time 25 1 Problem description Main objective: Simulate 5 Bank Teller lines, similar to the single Bank Teller line that we discussed in class, which is also described in Chapter 8 of the P&C textbook. Customers come into the SlugFest Bank, and they wait on one of the Teller lines. Each input line contains the name of the customer (with no spaces in that name), the number of the Teller line that the customer waits on (from 1 to 5), the arrival time for the customer, and the number of minutes that the customer's banking transaction takes. Arrival time for a customer is just the number of minutes since the simulation started that the customer arrived. For example, the input line 4 Jefferson 25 8 means that customer Jefferson arrives 25 minutes after the simulation started, waits on Teller 4's line, and has a banking transaction that takes 8 minutes But that doesn't mean that Jefferson gets to begin her transaction at time 25

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!