Project 2 Overview

Sample Customer Time Line The first requirement to solving a problem is to understand the problem. The image to the right might be useful in figuring out what is happening. Consider the timeline.dat data file:

0 7
1 6
2 5
3 8
4 4
5 9

Time 0: customer one (shown in red) arrives at the checkout lines. He is put into line 0, and his departure is time 14.

Time 1: Customer two (shown in in dark blue) arrives at the checkout lines. He is put into line 1, and his departure time is 13.

Time 2: Customer three (shown in brown) arrives at the checkout lines. He is put into line 3, and his departure time is 12.

Time 3: Customer 4 (shown in grey) arrives. He is put in line 3, and his departure time is 19.

Time 4: Customer 5 (shown in light blue) arrives at the checkout lines. He is placed behind customer 1 in line 0.

Time 5: Customer 6 (shown in green) arrives at the checkout lines. He is placed behind customer 2 in line 1.

Time 12: customer 3 leaves line 2. Nothing else needs to be done at this time, since no one was behind him in line.

Time 13: customer 2 leaves line 1. Customer 6 is now at the head of line 1, and his departure time will be 31 (13 + 2*9 = 13 + 18).

Time 14: customer 1 leaves line 0. Customer 5 now is at the head of line 1, and his departure time will be 22 (14 + 2*4 = 14 + 8).

Time 19: customer 4 leaves line 3. Nothing else needs to be done at this time, since no one was behind him in line.

Time 22: customer 5 leaves line 0. Nothing else needs to be done at this time, since no one was behind him in line.

Time 31: customer 6 leaves line 1. Nothing else needs to be done at this time, since no one was behind him in line.

Return to Math 210 Home Page.
Return to David's Home Page.
Return to Cayuga's Home Page.

Valid HTML 3.2!