Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C please, thanks!! University of Central Florida COP 3502C Lab 4 This week we will practice the code for queue operations with an application

image text in transcribedimage text in transcribedIn C please, thanks!!

University of Central Florida COP 3502C Lab 4 This week we will practice the code for queue operations with an application scenario. Problem : Simulate a call center queue system Simulate a call center queue system. When a customer calls to the call center, it will take the account number and name as input and put the customer in a queue. Considera queue of customer type with maximum size of 6. Use circular queue for your solution. The customer structure is described below: Typedef struct Customer int account_no; char namne[100); 1 customer; In an infinite loop, randomly choose between option 'c' (call) or 's' (serve). Maybe put 'c' and 's' in a character array and use rand method to choose between array index. If 'e' is picked, we assume a call is made. If the queue is full, inform the user that the system reached maximum capacity and to call later. If the queue is not full, ask the user to enter the account_no and name. Then put the user into Qucuc and display the queue with all the user account no and name based on their priority. If 's' is picked we assume the front customer will be served. Remove the customer from the queue and display the queue based on their priority. Press ctrl+c to close your program whenever you want to The purpose of the lab is not just to solve the problem, but also enforce you to understand the materials. As part of it, you should solve the above problem based on the circular QueueNoRear.c In your code, you should implement the following functions: struct queue customer elements: // you need to declare the customer structure, Use typedef while declaring int front; int nunElements; int queueSize; void init(struct queue* PLT); void enqueue struct queue Plt); // all the necessary inputs should be taken inside this function void dequeue(struct queue* qPtr); //display the served customer int empty(struct qucuc qP); void displayQueue(struct queue* qPtrx; // display the queue after any enqueue or dequeue operation University of Central Florida COP 3502C Lab 4 This week we will practice the code for queue operations with an application scenario. Problem : Simulate a call center queue system Simulate a call center queue system. When a customer calls to the call center, it will take the account number and name as input and put the customer in a queue. Considera queue of customer type with maximum size of 6. Use circular queue for your solution. The customer structure is described below: Typedef struct Customer int account_no; char namne[100); 1 customer; In an infinite loop, randomly choose between option 'c' (call) or 's' (serve). Maybe put 'c' and 's' in a character array and use rand method to choose between array index. If 'e' is picked, we assume a call is made. If the queue is full, inform the user that the system reached maximum capacity and to call later. If the queue is not full, ask the user to enter the account_no and name. Then put the user into Qucuc and display the queue with all the user account no and name based on their priority. If 's' is picked we assume the front customer will be served. Remove the customer from the queue and display the queue based on their priority. Press ctrl+c to close your program whenever you want to The purpose of the lab is not just to solve the problem, but also enforce you to understand the materials. As part of it, you should solve the above problem based on the circular QueueNoRear.c In your code, you should implement the following functions: struct queue customer elements: // you need to declare the customer structure, Use typedef while declaring int front; int nunElements; int queueSize; void init(struct queue* PLT); void enqueue struct queue Plt); // all the necessary inputs should be taken inside this function void dequeue(struct queue* qPtr); //display the served customer int empty(struct qucuc qP); void displayQueue(struct queue* qPtrx; // display the queue after any enqueue or dequeue operation

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions