Linked List and Queue using Linked, computer science homework help

Get perfect grades by consistently using www.assignmentgeeks.org. Place your order and get a quality paper today. Take advantage of our current 20% discount by using the coupon code GET20


Order a Similar Paper Order a Different Paper

Lab work

We have seen in class how to model and implement a queue dynamically using a Linked List in a composition relation.

Implement the class Queue that uses Linked List as an inheritance relation.

Note: You have as attachment the code of the Linked List and Queue using Linked List as composition. You just need to modify it.

use this:

#ifndef QUEUE_H
#define QUEUE_H
#include “LinkedList.h”
#include <stdexcept>
using namespace std;

template<typename T>
class Queue
{
public:
Queue();
void enqueue(T element);
T dequeue() throw (runtime_error);
int getSize();

private:
LinkedList<T> list;
};

template<typename T>
Queue<T>::Queue()
{
}

template<typename T>
void Queue<T>::enqueue(T element)
{
list.addLast(element);
}

template<typename T>
T Queue<T>::dequeue() throw (runtime_error)
{
return list.removeFirst();
}

template<typename T>
int Queue<T>::getSize()
{
return list.getSize();
}

#endif

"Is this question part of your assignment? We can help"

ORDER NOW

Writerbay.net

Do you need help with this or a different assignment? We offer CONFIDENTIAL, ORIGINAL (Turnitin/LopesWrite/SafeAssign checks), and PRIVATE services using latest (within 5 years) peer-reviewed articles. Kindly click on ORDER NOW to receive an A++ paper from our masters- and PhD writers.

Get a 15% discount on your order using the following coupon code SAVE15


Order a Similar Paper Order a Different Paper