Fall 2006
CS302 home page | Syllabus | Schedule/Readings/Notes | Lab Assignments | TA Web Site | Exams and Grading |
Lab Name | Due Date | Grading Guide | Status |
Lab 1 -- Stock Transactions | Sept. 11 | grading guide | Assigned |
Lab 2 -- Golf Handicaps | Sept. 25 | grading guide | Assigned |
Lab 3 -- Graphical Stock Charts | Oct. 2 | grading guide | Assigned |
Lab 4 -- Algorithm Analysis   Lab 4 Solutions | Wed., Oct. 11 | See lab writeup | Assigned |
Lab 5 -- Stock Reports | Wed., Oct. 25 | grading guide | Assigned |
Lab 6 -- Bank Simulation | Nov. 13 | grading guide | Assigned |
Lab 7 -- Grids | Nov. 27 | grading guide | Assigned |
Lab 8 -- Solving Mazes | Tues., Dec. 5 | grading guide | Assigned |
UNIX> chmod 0700 ~/cs302
You are allowed one late lab without penalty. Notify TA Charles Phillips (cphillip at cs.utk.edu) 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, with no exceptions. 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.
if (i == 0) { /* If i equals zero */ return; /* then return */ } else { /* otherwise */ exit(1); /* exit with a value of one */ }The above is an extreme example, but don't let it happen to you.
Here's an example of what I would consider a well documented program:
#include < stdio.h > /* sumnsquared.c Author: Ima Smart Date: August 23, 1998 This program prompts for and reads a value n from standard input, and then calculates and prints the sum of squares from one to n. It uses a for loop instead of using the closed form expression. */ main() { int n; /* The value */ int sum; /* The running sum of squares */ int i; /* An induction variable */ /* Prompt for and read in a value of n */ printf("Enter a value n: "); fflush(stdout); if (scanf("%d", &n) != 1) { exit(1); } /* Calculate sum for each value of i from one to n */ sum = 0; for (i = 1; i <= n; i++) sum += (i*i); /* Print the final summation */ printf("%d\n", sum); }