Question: Hello I need help with this C++ code Basically you need to create 2 classes one is a Queue - Circular Array implementation, where in

Hello I need help with this C++ code

Basically you need to create 2 classes one is a Queue - Circular Array implementation, where in each index of the array there is a linked list that stores chars. The second class is a linked list

Hello I need help with this C++ code Basically you need to

create 2 classes one is a Queue - Circular Array implementation, where

you need to write a program that creates an array of linked list queues and then executes it accordingly. Your main queue must be an array implementation of a queue using the circular queue algorithm you learned in class (keeping a head and tail index) Each element of that array will be a pointer to another queue. These queues will be linked list queues of their own containing individual chars. You can also use a stack instead of a queue for these if you choose to do so. But you must explain which implementation you did in the report. I recommend you do queues of queues. Front Back OHPHOHRU 51 Back H-O-FOTO Front THECHAT no hi ha contratante T Front Back JHKELEMEN Back If the above was the current status of the queues, and we were to dequeue nonstop the output would be: JKLMNOPQRS a b c d e Think of each of these queues as processes that are to be ran by a computer. Each process has a sequence of steps that are being run in an order of their own. So once you start executing them you must finish them. Your program must have the following methods for the main circular queue: enqueue (q_t) will add a linked list queue (q_t) to the next available spot in your circular queue de queue () will remove the next linked list queue in circular array by first printing out everything in that q_t then deleting it. . enqueue (int, char) Will add to the given index's linked list a character to that queue enqueuenext (char) Will add to the last linked list of the circular queue a character (to the end of that queue) For example if to the picture I did enqueuenext('F') it would add it after the e. resizequeue () Will multiply the circual queue's array size by two, then copy over to that new array. Make this efficient by just moving pointers to your lists rather than recreating the linked lists. createcircularqueue (int) Creates your initial circular queue with a given input size createqueue () Will create a linked list queue that you can then enqueue to the circular array. Make sure you also add functions to enqueue and dequeue to this queue before adding it. print () Print out the current circular queue and the elements of each linked lists. Sample: Circular Queue (Size: 11): Index 0: J, K, L, M, N Index 1: O, P, Q, R, S Index 2: a, b, c, d, e Index 3: Empty Index 10: Empty Make sure you test your code thoroughly and provide a main class along with your queue classes that test the functionality of your code so the TA can test it. Document your code and provide print statements that show what is happening on your code after each dequeue or enqueue. Reminder: DO NOT USE STL To complete assignment. you need to write a program that creates an array of linked list queues and then executes it accordingly. Your main queue must be an array implementation of a queue using the circular queue algorithm you learned in class (keeping a head and tail index) Each element of that array will be a pointer to another queue. These queues will be linked list queues of their own containing individual chars. You can also use a stack instead of a queue for these if you choose to do so. But you must explain which implementation you did in the report. I recommend you do queues of queues. Front Back OHPHOHRU 51 Back H-O-FOTO Front THECHAT no hi ha contratante T Front Back JHKELEMEN Back If the above was the current status of the queues, and we were to dequeue nonstop the output would be: JKLMNOPQRS a b c d e Think of each of these queues as processes that are to be ran by a computer. Each process has a sequence of steps that are being run in an order of their own. So once you start executing them you must finish them. Your program must have the following methods for the main circular queue: enqueue (q_t) will add a linked list queue (q_t) to the next available spot in your circular queue de queue () will remove the next linked list queue in circular array by first printing out everything in that q_t then deleting it. . enqueue (int, char) Will add to the given index's linked list a character to that queue enqueuenext (char) Will add to the last linked list of the circular queue a character (to the end of that queue) For example if to the picture I did enqueuenext('F') it would add it after the e. resizequeue () Will multiply the circual queue's array size by two, then copy over to that new array. Make this efficient by just moving pointers to your lists rather than recreating the linked lists. createcircularqueue (int) Creates your initial circular queue with a given input size createqueue () Will create a linked list queue that you can then enqueue to the circular array. Make sure you also add functions to enqueue and dequeue to this queue before adding it. print () Print out the current circular queue and the elements of each linked lists. Sample: Circular Queue (Size: 11): Index 0: J, K, L, M, N Index 1: O, P, Q, R, S Index 2: a, b, c, d, e Index 3: Empty Index 10: Empty Make sure you test your code thoroughly and provide a main class along with your queue classes that test the functionality of your code so the TA can test it. Document your code and provide print statements that show what is happening on your code after each dequeue or enqueue. Reminder: DO NOT USE STL To complete assignment

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!