CS 112b
Spring 2004
Ileana Streinu

Lecture 4


Today: Hands-on lab, moving towards Hw2

Pre-lab reading: Game of Life handout and a review of the previous lab
The goal of this lab is:

To do

  1. If you have finished or done more on the previous lab, please submit it now, but this time in Lab4. Then move on to the next item.
  2. Start implementing the game of Life, as specified in the next homework 2, following the directions and the structure given in your handout. Start with the main function, as described on the third page of your handout. But careful: copying from the handout will not work. You have to put all the functions in one file and to use C++, not C. Start with the functions Initialize, WriteMap, Enquire and CopyMap: if you do them all by the end of the lab, your homework is almost done: you will only have to write the code for NeighborCount.

Submitting

At the end of the lab, submit the file life.cpp and a typescript named typeLife in Lab4. Even if you are done, remember to submit hw2 in Hw2 (after generously embellishing it with comments and cleaning the code to make it look as nice and readable as possible).

You should comment your program, make sure you have the required header with all the information about you and relax: the lab will not be harshly graded. I want to see what each of you can do when working under time pressure.

Note: in the lab, you must work alone but you are allowed to talk with each other about the assignment, as well as ask questions to the instructor.

Grading

The grade for Hw2 is based mostly on the submitted homework, but also on what you did in labs 3 and 4. You have almost another week to complete the assignment, plus TA help sessions and my office hours on Wednesday before the homework is due. A small part of the grade wil be based on the lab - not necessarily for how perfect it was, but rather for what it showed about your utilization of the lab time, organization skills and focusing on the goal of the lab.