Programming Assignment Policy
Computer Science 102

Spring 2003

Style

Your program should follow the style guidelines below.

  1. Each program 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.

  2. Near the beginning of each of your programs, write a table of contents (inside a comment) that lists the name of each method you wrote.

  3. Break your program up into methods. Each method should fit onto one or two screens if possible. Methods on the same screen should be separated by a line of ****'s, or something similar. Each method should have a comment, right after its heading, giving its precondition and if necessary, postcondition.

  4. 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.

  5. Use a consistent indentation style that makes the structure of your program easy to read. Each "}" should line up with the corresponding "{".

  6. Strive for as clear and elegant a program as possible. Why come up with a convoluted solution if a simple solution is possible?

  7. Use final declarations instead of ``magic numbers'' inside your program.

Collaboration

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 course.
Sam Marateck
Wed 28 20:54:54 EST 2003