Question: Given in c++ the .h file #ifndef QUEUE_H #define QUEUE_H #include class Queue { public: Queue(int); ~Queue(); //circular queue methods void enqueue(std::string); void dequeue(); void

Given in c++ the .h file

#ifndef QUEUE_H #define QUEUE_H #include class Queue { public: Queue(int); ~Queue(); //circular queue methods void enqueue(std::string); void dequeue(); void printQueue(); void enqueueSentence(std::string); bool queueIsFull(); //check when full bool queueIsEmpty(); //check when empty protected: private: int queueSize; int queueHead; int queueTail; int queueCount; std::string *arrayQueue; }; #endif // QUEUE_H 

And further given these definitions

void Queue:: enqueue(std:: string word) /*Insert a new word into the circular queue, print out the added word and the index of the head and tail positions. If the queue is completely full, print "Queue is full." */

void Queue:: dequeue() /* Perform the dequeue operation on the circular queue and print out the indices of the head and tail positions. Also, print the word that was dequeued. If the queue is empty, print "Queue is empty." */

void Queue::printQueue() /* Print all of the elements in the queue in the specified format from Appendix A. If the queue is empty print Empty. */

bool Queue::queueIsFull() /* Returns true or false whether or not the queue is full. */

bool Queue::queueIsEmpty() /* Returns true or false whether or not the queue is empty. */

construct the functions in c++.

Any help on enqueue and dequeue would be especially helpful.

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!