Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Assignment 5 : Implementation of Priority Queue ADT Using NodeListG Implement the Priority Queue Abstract Data Type ( ADT ) using the NodeListG as defined

Assignment 5: Implementation of Priority Queue ADT Using NodeListG
Implement the Priority Queue Abstract Data Type (ADT) using the NodeListG as defined in Lesson 7. This
implementation should employ Object-Oriented Programming (OOP) principles and C++ templates,
enabling the ADT to manage elements of any type efficiently.
Part 1: Implementation
NodeListG Implementation
Incorporate all the .cpp and .h files previously utilized to implement the NodeListG as part of the List
Abstract Data Type (ADT) from Lesson 7.
PriorityQueueG Implementation
Utilize PriorityQueueG class
ListPriorityQueueG Class Implementation
Implement the templated class `ListPriorityQueueG` to manage elements in a priority queue using
NodeListG from Lesson 7. This class should be flexible to handle any type of elements defined by the
user with the help of a comparator for ordering.
ListPriorityQueueG.h (Header File):
Member Variables (Private):
o NodeListG L; // priority queue contents, E represents the element type
o C comp; // comparator
Member Functions (Public):
o ListPriorityQueueG();
o virtual ~ListPriorityQueueG();
o int size() const; // Returns the number of elements in the queue
o bool empty() const; // Checks if the queue is empty
o void insert(const E& e); // insert an element into the queue.
o const E& min() const throw(R); //returns the min element using comp.
o void removeMin() throw(R); // remove the min element using comp.
ListPriorityQueueG.cpp (Implementation File):
Implement all member functions declared in ListPriorityQueueG.h.
Point2D and Comparators Implementation
Utilize Point2DSTL
Exception Handling Implementation
Utilize RuntimeException and PriorityQueueException classes
Main Function Implementation
Implement the main function in a separate .cpp file (name it main.cpp) to demonstrate the functionality
of the ListPriorityQueueG class.
Test ListPriorityQueueG operations in the main function. Inside the main function:
Create an object of type ListPriorityQueueG
Add 4 different Point2D objects.
Utilize a while loop to print all Point2D objects by calling min() and removeMin() member
functions.
Create an object of type ListPriorityQueueG
Add 4 different Point2D objects.
Utilize a while loop to print all Point2D objects by calling min() and removeMin() member
functions.
Part 2: Implementation Explanation Document
In addition to the practical coding component of this assignment, you are required to submit a brief
document explaining your implementation. This document should provide insights into your design
choices, the challenges you encountered, and how you tested your program to ensure its correctness.
Requirements:
Format: Submit your document as a PDF file.
Length: The document should be concise, ideally 2-3 pages long.
Content:
1- Introduction: Provide a brief overview of the assignment, outlining its objectives and your
approach to meeting them.
2- Implementation Details: Discuss the key components of your implementation, including any
classes, functions, or algorithms you developed. Explain any specific design choices you
made and the reasons behind them.
3- Challenges and Solutions: Describe any significant challenges you faced during the
development process and how you addressed them. This could include technical hurdles,
conceptual difficulties, or issues with integrating different parts of your program.
4- Testing Strategy: Explain how you verified the correctness and robustness of your solution.
Detail any specific test cases or scenarios you used, and how they helped you to identify and
fix issues.
5- Conclusion: Reflect on your overall experience with the assignment. Highlight any key
learnings or insights you gained, particularly those that you could apply to future projects.
Method of Assessment:
Your performance in this assignment will be evaluated based on two main components: the practical
implementation (part 1), and the written explanation document (part 2). The distribution of marks is as
follows:
Practical Implementation: 80%
Written Explanation Document: 20%

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students explore these related Databases questions