logo
+1-617-874-1011 (US)
+61-7-5641-0117 (AU)
+44-117-230-1145 (UK)
Live Chat

Assignment 6 priority queue and selection sort

Description:

Alter your priority queue so it maintains priority using a Selection Sort. The highest priority should be given to nodes with larger values (ordered largest to smallest). Basically, sort your Priority Queue using a Selection Sorting algorithm each time the enqueue function is called. The priority queue should be written using a C++ class, named PQueue, and the queue itself should be implemented as a linked list.

The following classes should be defined by your program:

class Person : Used to store information about each person

class PQueue : Priority queue used to serve people The following public functions need to be implemented:

{`Person::Person( int, string ):	Initialize the person
PQueue::PQueue( void )	     :	Initialize the priority	queue
bool PQueue:                 :empty( void ) : Test whether queue is empty 
int PQueue::size( void )     :	Return	size 
Person* PQueue::front( void ):	Access	next node 
Person* PQueue::back( void ):	Access	last node 
void PQueue::enqueue( Person* )	: Insert node 
void PQueue::dequeue( void ) :	Remove node 
`}

The following private functions need to be implemented:

void sort( void ): Sort linked list using selection sorting algorithm

Improve Your Grades with Custom Writing Help
Homework Help
Writing Help
Editing Services
Plagiarism check
Proofreading services
Research Project help
Custom writing services
scanner
E learning blogs

Disclaimer : The study tools and academic assistance/guidance through online tutoring sessions provided by AssignmentHelp.Net is to help and enable students to compete academically. The website does not provide ghostwriting services and has ZERO TOLERANCE towards misuse of the services. In case any user is found misusing our services, the user's account will be immediately terminated.