Question: CSC241 ASSIGN2: Array of Circular Queues In a single-file project called Cashiers.java, code a user-defined class called Cashiers that consists of .A 3 x 6

CSC241 ASSIGN2: Array of Circular Queues In a single-file project called Cashiers.java, code a user-defined class called Cashiers that consists of .A 3 x 6 integer matrix to store numbers of up to 6 customers in the lines (queues) of 3 cashiers Two arrays, front and back, each of size 3, to follow a circular queue protocol An array, currentSize, of size 3, to keep track of the size of each line .A single variable customer, initially 1, which increments every time a new customer joins a queue. The following methods need to be coded for this class .A constructor Cashiers) clear fillo displayO int dequeue(int which), where which is the queue number 0. 1, or 2 boolean enqueue0, which picks the shortest queue (if a tie, the lowest number) . Use the Cashiers class also to contain a main method that repeatedly asks the user: Input command E or 1 or 2 or 3 or F or Cor Q Permit lower case by converting to upper case. Validate with the message Invalid input! if the user does not input one of these 7 options. Here are the actions that need to be coded, using one objedt of the user-defined class Cashiers E enqueuer, using the shortest queue (if a tie, use the lowest-numbered queue) 1, 2, or 3 - dequeuer from queue 0, 1, or 2. .F clear all queues and then fill up again .C clear all queues . Q quit After each input, display the data structure again. Here is a sample display: 4F 7 10B 0 0 0 3F 6 8F 11B 9 12B 0 For each entry, give the customer number (0) if location not used, and list F or B or FB after the number as appropriate, where F labels the front and B the back of the queue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
