Question: Implement a Priority Queue with an unsorted list to store data. Please fill in the following member functions and create the necessary classes to utilize

Implement a Priority Queue with an unsorted list to store data. Please fill in the following member functions and create the necessary classes to utilize a list. Do not add extra member functions to the priority queue class listed below, just fill them in and add separate classes for list implementation. Remember that the list is unsorted. Everything should be done in compilable C++ code.

template

class PriorityQueue

{

private:

// data here

public:

PriorityQueue(void);

// Performs an insertion of "n" items from dataArray into the priority queue

PriorityQueue ( Type *dataArray, int n ){};

~PriorityQueue(void){};

bool isEmpty(void){};

int size(void){};

// inserts a piece of data into the priority queue

void insertItem ( Type data ){};

// removes and returns the minimum value in the queue

// throws an exception if the queue is empty

Type removeMin ( void ) throw(exception);

// return the minimum value in the queue without removing it

// throws an exception if the queue is empty

Type minValue ( void ) throw(exception);

};

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!