Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help using C++ Thank you Note: the description for problem 1 is struct-based instead of class-based. You can always implement it as a class
Please help using C++
Note: the description for problem 1 is struct-based instead of class-based. You can always implement it as a class instead of simple struct Problem 1: FIFO (First In First Out) or FCFS (First Come First Service) Queue (Non-circular Array-based): Step 1: define data types 1) Define a structure named Customer with four members CustomerName: 15-character string, which is the name of the customer ArrivalTime: integer, which is the arrival time of the customer Service Time: integer, which is the time point that the customer starts to be serviced Finish Time: integer, which is the leaving time of the customer 2) Define a structure named FCFSQueue with two members: CustomerList: an array of 100 elements of type Customer length: integer, which is the number of the customers in the queue. Step 2: Functions 1) function IsEmpty check whether the queue is empty or not. Return true if empty otherwise return false; function prototype: function definition: bool IsEmpty FCFSQueue); bool Is Empty FCFSQueue queue) lif queue's member length is 0, return true; otherwise, return false 2) function Getl.ength will returns the number of customers in the queue; function prototype: int GetLength FCFSQueue); int GetLength FCFSQueue queue Wreturn queue's member length function definition Thank you
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started