Programming Assignment Policy
Computer Science 102
Your program should follow the style guidelines below.
Each program and unit should have a header comment at the top, with
the following information: your name, the course name, your email
address, and the assignment number. After this information, describe the
purpose of the program or unit.
Near the beginning of each of your programs and units, write a table
of contents (inside a comment) that lists the name of each procedure
and function you wrote.
Break your program up into procedures (and functions). Each procedure
should fit onto one or two screens if possible. Procedures on the
same screen should be separated by a line of ****'s, or something
similar. Each procedure and function should have a comment, right
after its heading, giving its precondition and postcondition.
Place comments in your program wherever something needs to be
explained to the reader. Each non-trivial loop should have a comment.
The variable identifiers should be self-commenting, e.g.,
answer, token, tree.
Use a consistent indentation style that makes the structure of your
program easy to read. Each begin should line up with the
Strive for as clear and elegant a program as possible. Why come up
with a convoluted solution if a simple solution is possible?
Use constant declarations
instead of ``magic numbers'' inside your program. Avoid using global
variables. Avoid using the goto or break statements.
All projects are to be done individually. You may discuss the
assignment with other students in a general way, but the design and
coding of the program is to be done on your own. Copying will not be
tolerated, and violators will be punished, possibly by failing the
Wed 28 20:54:54 EST 1998