Question: Please help with problem 2 and 3 using c++ on the last page. Thank you! CSC326 Lab Assignment 6 Queues Dae on 04/23/2018 Note: the
CSC326 Lab Assignment 6 Queues Dae on 04/23/2018 Note: the description for problem 1 is struct-based instead of class-based. You can always implement it as a class instead of simple struet. roblem I: 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: Customer Name: 15-character string, which is the name of the customer Arrival Time: 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 Is Empty check whether the queue is empty or not. Return true if empty, otherwise return false; function prototype: function definition: bool IsEmpty (FCFSQueue); bool IsEmpty FCFSQueue queue) lif queue's member length is 0, return true; otherwise, return false 2) function GetLength will returns the number of customers in the queue; function prototype: int GetLength(FCFSQueue); int GetLength FCFSQueue queue) //return queue's member length function definition
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
