Laboratory Assignments

Introduction to Computer Science II, Summer 2001


Table of Contents

Introduction

This page describes the objective and procedures for the lab assignments in CS 176 for the Summer Session, 2001.

Lab Objective

The objective of these lab assignments is to develop an important skill needed by every good programmer: the ability to test for, find, and fix errors in existing code.

Nobody writes perfect code the first time; there's always some errors lurking around in your programs. Good programmers, when done writing their code, don't just toss it over the wall and go on to the next problem. Instead, they test their code first to make sure they haven't made any dumb errors; then they throw it over the wall.

In addition, the traditional starting job for neophyte programmers is testing and maintenance; that is, finding and fixing errors in other people's code. Even after you get promoted out of the test department, you still do testing and maintenance; it's just that you do lots of other things too.

Lab Procedure

All the labs will follow the same general procedure: you'll be given a broken lab program at the start of the lab, and you'll have until the end of the lab (about an hour or so) to do two things:

  1. Create three sets of test input data, at least one of which shows the presence of an error in the lab program.

  2. Fix the error in the lab program your test data discovered.

A lab program may have several errors; you should try and find as many as you can, but make sure you find and fix at least one error.

You may use your book and class notes during the lab assignment.

Partners

You should work on these lab assignments in groups of two. If there are an odd number of students in the lab, then one group may contain three students. The intention is that groups remain together for a month, and that every month new groups form.

Turn-In

At the end of the lab, you need to turn in four things: your three test sets and your improved lab program. For the moment, you should submit them on paper; eventually you'll be able to do it via e-mail. Make sure all the names of the group appear somewhere in the turned-in assignment.


This page last modified on 21 May 2001.