Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a Queue system simulation. Create a class for Customer Creation, Server (

ID: 3873700 • Letter: C

Question

 Create a Queue system simulation. Create a class for Customer Creation, Server (barista) management, list of servers (baristas) who are either busy or idle, and a wait line,   Customers should be given the following info: - customer number - time entered into shop - transaction time (time entered minus time coffee received)  Server (barista): - Server name - busy (1) or idle (0) - customer number they are helping if busy  Server list is just a list of servers that are being used in the simulation.  Wait line: - Should use first come first serve. - when a customer enters the coffee shop, add them to the queue - when a customer receives their coffee, they are removed from the queue list  Some more details can found here: https://hastebin.com/savazatezu.http  
 Objects in Simulation: Customer Server Server List Wait Line 
    Goals: Maximum average wait time of 5 minutes How many servers are needed? What is the average wait time?(7-8 minutes is good enough) Run for 300 ticks     Other Info: Assume 3 minute brewing time to make coffee Simulation Engine Runs on clock ticks 1 tick = 1 min  Clock tick cycle Customers walk in 10% of the time 3 Customers come in, 20% 2 come in, 30% 1 comes in, and 40% none come in If a server is available, assign a customer to them Update customer line and wait times Update Servers Update customers, if applicable Check if Customer serving is done If so, set server as free(not busy) Customer Statistics   While loop while time < 300    rand()  #include  #include  Unsigned int seed = time(0);  srand(seed);  Int numberOfCustomers = rand() % 10; {0,1,2,3,4,5,6,7,8,9}; If 0 - 3 customers; If 1,2 - 2 Customers If 3,4,5 - 1 Customer If 6 7 8 9 - 0 Customers 

Explanation / Answer

#include<stdio.h>

#define MAX 5000

class CustomerCreation

{

int customerNumber;

float timentered;

float transactionTime;

void creation()

{

customerNumber=rand()%10;

int seed=time(0);

coffeeTimeRecv=seed;

while(time<300)

timentered=dateTime();

transactionTime=timeentered-coffeeTimeRecv;

}

}

boolean status; // busy (1) or idle (0)

void addQueue(int customerNumber)

{

int queue[MAX];

int start=-1,int end=-1;

if(start == -1)

{

start=start+1;

if(start>=0)

{

end=end+1;

queue[end]=customerNumber;

}

}

}

// when a customer receives their coffee, they are removed from the queue list

void removeQueue(boolean b)

{

if(b==0)

{

queue[start]=0;

start=start+1;

}

}

{

string Serverlist[]=new Serverlist;

void display()

{

for(int i=0;i<length.Serverlist;i++)

{

printf(Serverlist[i]);

}

}

}

void main()

{

printf("Ënter your choice: 1. Customer Creation, 2. Server Management- Give Order 3. Taken Order");

scanf("%d",&ch);

CustomerCreation custCreate=new CustomerCreation();

switch(ch)

{

case 1:

custCreate.creation();

case 2:

case 3:

case 3: loS.display();

}

}