CS302 -- Fundamental Algorithms

Brad Vander Zanden

Labs


  1. Information on general lab policy, late labs, cheating, and how to comment code can be found after the table of lab assignments (i.e., at the bottom of this page).
  2. Information about how to submit labs and hints can be found at the TA's website.


All labs are due at 11:59pm on the due date unless otherwise noted.

Lab NameDue DateGrading Guide
Lab 1 -- Stock Charts Sept. 5 grading guide
Lab 2 -- C++ Lists & Streams Sept. 13grading guide
Lab 3 -- Golf Handicaps--Steps 1-3 Sept. 20grading guide
Lab 3 -- Golf Handicaps--Entire lab Sept. 25grading guide
Lab 4 -- Algorithm Analysis and Solutions Oct. 2 See lab writeup
Lab 5 -- Bank Simulation
Intermediate deadlines:
  1. Oct. 9 -- step 6 (routines for generating random numbers from a histogram file and for a uniform distribution). We will test your code using the same routines that we've provided you to test your routines.
  2. Oct. 18 -- steps 1, 4 (see Details in lab 5) and a routine that generates all arrival events and inserts them into a priority queue. It's ok for your print routine to print 0's. You should print out the times associated with all the arrival events.
Oct. 22 @ 8pm grading guide
Lab 6 -- External Sorting
Intermediate deadline:
Oct. 29 @ 11:59pm: For both non-replacement and replacement sorting create the initial runs that are stored on each scratch output file. You should submit an executable that creates these scratch output files so that the TAs can examine them and make sure you are on the right track. The names for your scratch files should be easily recognizable and should be preferably numbered (e.g., 0, 1, 2, etc.).
Nov. 5 @ 8pm grading guide
Lab 7 -- Sorting, B-Trees, and Extendible Hashing and Solutions Nov. 13 at the beginning of class See the assignment
Lab 8 -- Pert charts Nov. 27 grading guide
Lab 9 -- Grids Dec. 6 grading guide


The following labs have been assigned in previous semesters and some variation of them are likely to be assigned this semester. For example, the first couple labs will likely be converted to use the C++ Standard Template Library rather than Dr. Plank's Dlist and Red Black tree libraries. kely be re-used.

Lab NameDue DateGrading GuideStatus
Lab 2 -- Golf Handicaps Sept. 10grading guideReady
Lab 4 -- Stock Reports Oct. 1 grading guideReady
Lab 7 -- Extendible Hashing Nov. 12 grading guide Ready


General Stuff

Lab attendance is not mandatory although the TA in charge may give out information, or perhaps lecture a bit. It is good to use that time to work on your labs since there is a TA available. The TA's will have office hours, but may be hostile if you are asking questions that you should have been asking in lab.


Cheating

  1. It is permissable to talk to other students about your strategy for solving the problems assigned in labs. However, any code and any written material you submit must be written exclusively by you or provided by Professor Vander Zanden. Note that the word "exclusively" means that you may not use code written by anyone else, including but not limited to former or current students. Failure to follow this guideline is considered cheating.

  2. It is not permissable to give code or written material that solves or partially solves a lab assignment to another student. Doing so is considered cheating. If you leave your directories or files publicly readable, we will consider that to be evidence that you have voluntarily given your code or written material to other students. Therefore you should read protect all directories and files associated with CS302. If you have a directory named cs140 then you can read and write protect it using the following command:
    	UNIX> chmod 0700 ~/cs302
    	

  3. Cheating will be dealt with harshly. At best you will receive a 0. At worst you will be referred to the office of student affairs for academic misconduct.


Late Labs

You are allowed one late lab without penalty. Notify one of the TAs before the lab deadline that you plan to take your late lab. You will have one week from the due date to complete the lab. After your first late lab all subsequent late labs will receive a grade of zero unless you have a compelling, written excuse from someone such as a doctor. The reason for this policy is that I want you to hand in whatever you have completed with a lab and move on to the next one. In the past when I have permitted late labs with a per day penalty students have fallen hopelessly behind trying to complete labs and have ended up with extremely low lab averages.

The one late lab policy makes it imperative that you do not procrastinate and start your lab a day or two before the deadline. I will not look kindly upon excuses that the computers in the labs crashed a couple hours before the deadline. If you plan your time wisely you will have your lab mostly complete a day before the lab is due.


Writing Clean Code

Here are the thoughts of a number of people on writing clean code. I expect you to read each of their opinions, especially mine!

  1. Writing Nice Code by Prof. Ian Horswill, Northwestern University and Prof Lynne Parker, Univ. of Tennessee.
  2. Commenting Your Code by Prof. James Plank, University of Tennessee.
  3. Writing Clean Code by Prof. Brad Vander Zanden, University of Tennessee.