Homework 10

Linked Queue

The purpose of this assignment is to implement a Circular Doubly Linked Queue, which is built around a linked lists. The behavior of a queue is First In First Out with two main operations, enqueue and dequeue. This implementation of the queue will use a dummy head node, which will act as a reference to the front of the queue and the back of the queue. When the queue is instantiated, the dummy head node's next and prev will point to itself. The dummy head node will only be deallocated when the queue object goes out of scope. When the first element is enqueued, a new node is added to the back of the queue (head's prev). For the dequeuing operation, the element at the front of the queue is removed and the value returned. Your task is to write the LinkedQueue.h header file and LinkedQueue.cpp Implementation file. Node.h, Node.cpp, and main.cpp will be given to you. Details for the queue's operations are given below.

hw10 files