in C++ we discussed how to create a class that models the operation of a data structure
Question:
in C++ we discussed how to create a class that models the operation of a data structure known as “stack”, which operates according to the Last-In-First-Out (LIFO) rule. In this problem, we will create a class for another data structure known as “queue”, which operates using the FirstIn-First-Out (FIFO) rule.
The queue class should support the following features:
• Enqueue: Inserts a new element at the rear of the queue.
• Dequeue: Removes the front element of the queue and returns it.
• Peek: Returns the front element present in the queue without dequeuing it.
• IsEmpty: Checks if the queue is empty.
• IsFull: Checks if the queue is full.
• Size: Returns the total number of elements present in the queue. The task is to create a class that supports these features. You can create any appropriate functions you see fit to support these features. You are also required to create any supporting functions in the class for appropriate use of the class such as constructors, destructors, getters,and setters. You also should create a “main” program with statements that test every one of the features above.
You can only use basic data types inside your code (int, double, char, string, array). The queue class you create can support only one of those basic types, similar to what we did in class with the stack class. • You should not use inheritance, polymorphism, templates, vectors in your code.
in C++