CPE 101

Turner, Fall 2008


HWK 4.  Due on Friday, 21 November, 2008


This homework is simple and you've probably already done it.  :-)


You are to carefully write up the "design" for your Programming Project 3, the Game of Life project.  Review your textbook on the elements of "design" for a program.  


At a minimum, you are to write up for your homework:


0.  The main data type you will use to represent the GameOfLife on the screen, why you chose this data type, and how it will serve your purpose in the program.


1.  A list of function prototypes for your program including a leading comment that explains in detail the: 

-  the function inputs, their types and purpose in the overall design (Why do you need them in this function?  Where do they come from in the program?) 

-  the function outputs, their types and purpose in the overall design (Why do you need these for output?  What is their purpose in the overall design?)

-  the internal variables you declare, their types and their purpose in the design of the function itself.

-  always keep in mind the rules for designing functions, including style rules about size.


These items need to be in very plain and understandable English that an educated person who barely understands anything about programming could understand.  Your variables need to be well named,  "self explanatory" naming is required for both variables and functions.  


2.  A static call graph that shows all your functions, your main function and the "calls" relationship between them.  Do this hierarchically, have the main function at the top, a row below of the functions it calls, then a row beneath of the functions that each function calls.  


3.  To accompany the static call graph, a brief explanation of how your main program functions - how the main data type is used and manipulated in the main program to achieve your goals by using the functions you write.  


Note that if you come to me (or anyone else), you'd better have such documentation on hand, else debugging is nearly impossible.