Definition of the Data Structure:
To allow the reuse of the positions already occupied, the concept of "Circular Queue" is used.
We need a new component to indicate how many elements there are in the queue at the moment.
-
Create - creates an empty queue
-
Empty - tests if a queue is empty
-
First - gets the element from the beginning of the queue
-
Inserts - inserts an element at the end of a queue
-
Removes - removes the element from the beginning of a queue, returning the removed element
-
Empty - removes all elements from the queue.
-
PrintQueue - prints all elements of the queue.