Can anyone please help me with this assignment. I need it very urgently

You will need to implement a CustomerQueue class. You should only implement a constructor, enqueue, dequeue and isEmpty. Your class should also have a private Node struct. Write a program called shopSim.cpp which will use the CustomerQueue class you have implemented. You should use CustomerQueue to simulate customers in a line up at a shop. A customer has the time it takes to serve them and the amount money the customer will spend. Your program should ask the user for how many cashiers are there. Each cashier will have their own line up or CustomerQueue. Your program should then ask the user for the name of the file they wish to run. The file that will have the following format, each line will have three numbers the first is the time the customers arrivals, the time it takes to serve the customer and amount the customer will spend. The customers will be in the order that they will arrival and two customers will never arrival at the same time. A customer will always go to the shortest line(the one with the least number of people in it) and a cashier can only help one customer at a time. Sample output What file would you like to run Test.txt number of cashiers 3 total time 20 cashier e helped 3 customers and took in $22.2 cashier 1 helped 3 customers and took in $18.14 cashier 2 helped 1 customers and took in $4.5

Given test file

4 5 3.4 5 2 7.4 6 2 4.5 7 1 9.4 10 2 8.3 13 7 10.5 15 4 1.34You will need to implement a CustomerQueue class. You should only implement a constructor, enqueue, dequeue and isEmpty. Your class should also have a private Node struct. Write a program called shopSim.cpp which will use the CustomerQueue class you have implemented. You should use CustomerQueue to simulate customers in a line up at a shop. A customer has the time it takes to serve them and the amount money the customer will spend. Your program should ask the user for how many cashiers are there. Each cashier will have their own line up or CustomerQueue. Your program should then ask the user for the name of the file they wish to run. The file that will have the following format, each line will have three numbers the first is the time the customers arrivals, the time it takes to serve the customer and amount the customer will spend. The customers will be in the order that they will arrival and two customers will never arrival at the same time. A customer will always go to the shortest line(the one with the least number of people in it) and a cashier can only help one customer at a time. Sample output What file would you like to run Test.txt number of cashiers 3 total time 20 cashier e helped 3 customers and took in $22.2 cashier 1 helped 3 customers and took in $18.14 cashier 2 helped 1 customers and took in $4.5



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *