Introduction to Computer Science II for non-majors James Tam   Return to the course web page

CPSC 219: Assignment 4

Tips for this assignment:

  1. Start early!  For what it's worth this was one that stumped me when I had to do it in first year - for a while at least but even I got through it eventually :-).
  2. (Ignore this tip at your own peril!). Take the assignment in small steps, don't try to implement a bunch of features all at once. It will make things seem more overwhelming plus it will be very hard to test and debug if things don't work. Start with a plan and determine what are the major parts of your program, and only work on one part at a time. The classes have already been specified for you but the methods and attributes need to be specified. Try to implement each method one-at-a-time and test each one to be reasonably sure that it is working before going onto the next. That way if an error crops up part way through you should be reasonably sure that the problem lies with the new method and not ones that you have already written.
  3. Use debugging aids such as including output statements and the Mode class in your program. Try to isolate your test cases e.g., test the "critter dies" and "critter is born" algorithm separately if you get really stuck. Make liberal use of "print's" and "println's" to view the state of the biosphere to verify if the rules are correctly specified.  Doing things like this really helps you figure out where things are going wrong, this is why I listed it as one of the assignment requirements.
  4. Have fun! Remember this is only one assignment (the Game of Life Assignment NOT EQUAL TO your whole life) so try not to get too exasperated by things.

Some other online resources:

  1. Online demo version (requires 'java' to be installed for your browser): http://www.bitstorm.org/gameoflife/
  2. Background information and additional explanations: http://www.math.com/students/wonders/life/life.html