Friday, November 29, 2013

c++

there is a large busy cosmetic store. In store, for billing, there are four counters with four tellers (who deal payment etc) . A customer comes to the store and collects the things he/she wants to purchase and go to one of the counters to pay for purchase. If there are already people in front of counters, customer has to stand in the queue. A customer generally selects the shortest queue (with respect to the number of people in queue). The selection can become wrong if one of the people in the queue has a huge buying list. But if we know the estimated time of each customer in the queue, selection can become efficient. The system can become efficient, if we tell a new person which one is the shortest queue with respect to time taken by the people waiting in the queue.#include



#include #include #include "Customer.h" #include "Teller.h" using namespace std; int main(){ tellr T1, T2, T3, T4; int a,b,c,d; char m; while(m != 'n'){ int tym; cout > tym; a= T1.TotalTym(),b = T2.TotalTym(),c = T3.TotalTym(),d = T4.TotalTym(); int minimum = a; if(b < minimum)minimum = b; if(c < minimum)minimum = c; if(d < minimum)minimum = d; if(a == minimum) { cout

Full Post

No comments:

Post a Comment