Please not copy from other answers and post, I needs the codethat really works!!!
Please write in C++ language.
Using the following UML diagram, write a class that implements apriority queue using a heap. Place your solution in it’s own headerfile named PQueue.h.
ATTRIBUTES
- heap – a pointer that holds a dynamically allocated array ofintegers.
- size – stores the size of the array.
- bottom – keeps track of the bottom of the heap.
- constructor – accepts an integer as it’s only argument anddynamically allocates an array with that many elements, stores theargument in size, and initializes bottom to -1. Address of the newarray is stored
OROR