You must create a struct to store a queue of customers. This struct should have a pointer to a customer struct, and a pointer to a node struct. You must create a node struct for a linked list of customers. Note that the storage of the line number is redundant, but is designed to ease implementation. You must create a struct that stores information about a customer (name, number of items, line number, time entering line). JENNY from line 1 checks out at time 625.ĪMALIA from line 12 checks out at time 100295. JERMAINE from line 6 checks out at time 395. Sample Output: STEVEN from line 1 checks out at time 100.ĪHMAD from line 6 checks out at time 170. You will write a program that reads in information about customers: which line they go to the back of (1 through 12), at what time (in seconds) they enter that line, and the number of items they have, and determines at what time each customer will check out. Thus, if a customer has 8 times, the clerk would check her out in 30 + 8*5 = 70 seconds. The number of seconds the store clerk takes to check out a customer is 30 plus 5 times the number of items. It’s possible that some of these lines will be empty, in which case these lines are ignored. If there are two customers with the same number of items, he’ll take the customer who comes from the smaller line number. Of all of the customers at the front of those lines, he’ll take the customer who has the fewest number of items. After the cashier finishes helping a customer, he will survey all of the lines that are currently queued. thanks btw.Ī store is having customers queue in several lines. I need a mentor to explain what I am missing and what I have right per the assignment. I need to enqueue a whole struct customer in the queue - I think.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |