CS 14 - Lab


CS 14 Homepage

First Task - Lab Practical

Complete the lab practical as assigned by the TAs. You will have 2 hours to complete the practical. You will turn in your lab using the electronic turnin. WATCH THE TIME! The electronic turnin will be gone 2 hours after the scheduled start time of your lab section and ASBOLUTELY NO LATE LAB PRACTICALS WILL BE ACCEPTED NO MATTER WHAT THE REASON EVEN IF YOU ARE ONLY 1 SECOND LATE. DO NOT TRUST THE CLOCK ON YOUR COMPUTER!!! IT IS NOT THE SAME AS THE CLOCK ON THE TURNIN SERVER. MAKE SURE YOU OPEN A TURNIN PAGE AND REFRESH IT IF YOU WOULD LIKE TO KNOW THE CURRENT TIME. REMEMBER THAT LAB PRACTICALS ARE 8% OF YOUR GRADE. DO NOT PUSH THE TURNIN TIME BECAUSE IF YOU MISS THE TURNIN, YOU ARE OUT OF LUCK. I suggest that you implement the functions in the order specified above and turn in a copy of your code each time you get a new function working so that you can maximize your points. You may not use ANY reference material at all and, should I even need to specify that this includes man/info pages, web, IM, chat, email, book, previous code written by you, code written by anyone, etc. You may not look at ANY reference while doing this lab practical. You may only look at this web page containing the lab practical, electrontic turnin, your code that you are currently writing for the practical, and gdb or ddd.

Second Task - 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

Point Breakdown For Lab Assignment

You will be working alone for this lab

You may demo your program in lab or it will be graded from your electronic submission (due 24 hours after the end of your lab section). 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.