CS 14 - Lab


CS 14 Homepage

Array Implementation of a Binary Heap (and experience with pointers)

In this lab you will be implementing a max heap (the highest number will be the root). You will be simulating a print queue and each print job will be represented as a class called PrintJob. You must implement the enqueue, dequeue, print, and highest functions for your heap class and various functions for the PrintJobs class. Your heap will be implemented as a dynamically allocated array of print job pointers (this will perhaps give you an experience with pointers that you have not yet had).

Provided files


Sample output

Point Breakdown For Lab Assignment

You will be working alone for this lab

You will demo you program in lab. Please show the output from main.cc to the TA if you complete the lab. Remember, to receive credit for this lab, you MUST turn the code in online. If you do not turn in your code online, you will lose points for your lab. All code must be turned in online for archival purposes.

© 2003 UC Riverside Department of Computer Science & Engineering. All rights reserved.