0% found this document useful (0 votes)
6 views2 pages

DSproject

This project involves implementing a priority queue data structure in C++ with a focus on teamwork and equal contribution from all members. The priority queue will consist of multiple queues corresponding to different priority levels, with operations such as insert, moveUp, moveDown, and remove. Submissions are divided into an initial submission of the class and a main file, followed by a final submission of the complete code demonstrating all operations.

Uploaded by

2yd58w5p4x
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

DSproject

This project involves implementing a priority queue data structure in C++ with a focus on teamwork and equal contribution from all members. The priority queue will consist of multiple queues corresponding to different priority levels, with operations such as insert, moveUp, moveDown, and remove. Submissions are divided into an initial submission of the class and a main file, followed by a final submission of the complete code demonstrating all operations.

Uploaded by

2yd58w5p4x
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Data structures and algorithms – Project description

Abstract
In this project you will implement a priority queue data structure.

Team
You will work in groups of 4 people. Each of the teammates must contribute equally to all
aspects of the projects.

Methods and Tools


You will use C++. Document and comment your work as necessary within the code. You will
submit a THREE code files: header, implementation and the main file demonstrating the use
with examples. Everything must be included in these files.

Use C++11 standard.

Desciription
A priority queue is a collection of several queues, each one corresponding to pririty level.
Priority levels are indicated by integers. Queue 0 has the highest priority. Queue 1 has the next
highest and so on.

The data item in a node in queue is an integer representing its ID. Items are inserted into the
prirority queue, moved between different priority levels and removed from the priority queue.

A snapshot of a priority queue with 3 levels is the following

Q0: 7, 9, 3, 24
Q1: 8, 1, 2
Q2: 17, 21, 4, 5, 34

Task

You will implement the priority queue as a class. It will have a constructor with a parameter
specifying the number of levels. You will also provide a default constructor with only 2 priority
levels.

The priority queue will support the following operations with obvious meanings:

insert(id, level)
moveUp(id)
moveDown(id)
remove(id)
Submissions:

First submission

Submit only the class with its constructors and a main file demonstrating its use.

If you submit anything more, you will get only 50% of the points maximum.

Final submission will be the complete code together with the implementations of the
operations. Clearly demonstrate their uses in the main.

You might also like