hello everyone.
i need a bit of help in this project of mine which is due in 2 weeks.. here's what needs to be done, but i have no idea about the logic:( if somebody can help me with the pseudocode or algorithm, i could write the code maself..
Write a program to simulate the working of a utility store. The utility store has three counters for the gents and one for the ladies. At any given time if all the counters are free, then the customer entering the utility store can go to any of the counters. If ladies counter is empty then the gents can use it and similarly if any of the gents counter is empty then the ladies can also use it provided the queues allocated for their gender is occupied). Lets say, the time required to serve any customer is t minutes. If a customer enters the store at time t1 then he should be out of the store at t+t1 provided that there are no queues in front of the counters. In case there are customers being served at all the counters then queues will be maintained in front of each counter and the new customer will go to the shortest queue. In the case of queues, a customer will be out of the store at “t+t1+the time he spent waiting in the queue”.
Our goal is to calculate the average time spent by each customer in the utility store.
Inputs
User should press m/f at any time for telling the program that a male or a female customer has entered in the store.
Outputs
Program should output following
• On each arrival the status of the queues should be updated and displayed
• Should mention the number of customers serviced and average time spent by the customers in the store
looking ahead to some help..regards
niitian