Now that you have the basics of h, hpp, and cpp file management down, you can implemnent this assignment from scratch and test it from scratch.
You are required to submit 3 files:
You are not required to have any hpp files, but you can.
You should not use a separate cpp implementation file(s) this time, just include everything in the h and/or hpp files.
You will implement a priority queue (the abstract data type) using a max-heap (the data structure).
http://en.cppreference.com/w/cpp/container/priority_queue
The priority_que has few functions, and you will implement the following for MyHeap:
The behavior, return types, and parameters of the top, pop, push, empty, and size should be congruent with those of the std::priority_queue.
You WILL need to have internal functions to dynamically reserve more space for your array if it fills up, and if it becomes less than 1/4 full, to shrink the internal array size to fit.
Next, you will build two functions, is_sorted() and sort().
The sort function can use whatever algorithm you want, but it would be easy to use the heap operations to implement your sort if you want. These functions are generally modeled after:
http://en.cppreference.com/w/cpp/algorithm/sort
http://en.cppreference.com/w/cpp/algorithm/is_sorted
The sort functions will be much simpler (and diffirent than) the std:: versions.
The sort functions will be graded for speed (the last 5 points of your grade, with 95% for correct functioning of everything else).