CS 112a
Fall 2000
Ileana Streinu
Homework 3
Thursday Sept. 21, 2000
Due Wednesday 9/28/2000 by midnight.
Outline
Your task is to write in C++ a program for the game of Life. The program
should be named life.cpp. All the functions and the main program should
be in this file, you shouldn't use other files. You will submit in Hw3
two files, life.cpp and a typescript.
Program
The game of Life, and a structured approach for writing a program for it,
is contained in the handout distributed in class on Th.,Sept. 21. The
description in the handout is both in pseudo-code and C. Using it to
guide your thinking, you will have to develop a full C++ program. You should
generously use functions, as suggested by the approach in the handout.
You should use the work you did in the lab,
lecture 5 and
build upon it (i.e. you could and should use
for the homework some of the functions developed
during the lab).
Test your program on the data sets in Fig. 1.1 of the handout, and make sure
these tests show up on your typescript in the same order.
Last modified Sept. 19, 2000.
Ileana Streinu