Next: About this document
Up: Assignment 0: User-defined objects
Previous: Calculating GCDs
The following are the steps you should follow for turning in
assignments throughout the semester.
- Review your code and make sure it is indented properly.
Remove any unused methods or unreachable code. Remove code
that is commented out.
- Review the names of the variables and methods to make
sure that they are meaningful (with the exception of things
like i and x that are conventional). If the role
of a variable is not obvious, add a comment that explains it.
- Add a comment before each method that explains what it does,
at an appropriate level of abstraction. Document any unexpected
behavior the method might have.
- Within each method, add comments that explain broadly how
the code works. Document anything unusual or non-intuitive.
Do not write comments that are redundant with the code.
- Arrange the code and comments visually in a way that makes
the program easy to read. Avoid line breaks that make the layout
of the code unpleasant.
- Print the code in a comfortable-sized font (12 point),
portrait aspect.
- On the hardcopy, write your name in the upper right-hand
corner and identify which assignment and which part of the
assignment it is.
- Highlight the name of each method, preferably using a highlighter,
but optionally underlining with a non-black pen.
- If the assignment includes code that you did not write,
put a box around it and cross-hatch the box.
- Arrange the parts of the assignment in the order they were
presented. Staple all pages of the assignment together in the
upper left-hand corner.
Allen Downey
Thu Sep 7 11:50:06 EDT 2000