Fundamentals of Computer Science II (CSC-152 97F)
Notes on Assignment Five: Integer Lists
Unfortunately, I've lost my notes on common problems with
assignment five. This is my attempt
to summarize the most common errors.
- It was good to see that many of you borrowed code from elsewhere
and cited that borrowing (those who didn't cite it should have).
However, it is also helpful if you make it clear what you did and
didn't change (either by inserting comments on each line you
modified or with a few sentences at the begining).
- You need to work on your javadoc comments. The basic structure is
- A one-sentence description of the method, class, or field.
- Any other prose that will help someone understand purpose.
- The preconditions (for methods).
- The postconditions (for methods).
- A blank line.
- The appropriate fields.
- Author and version for classes.
- Exceptions (and perhaps parameters) for methods.
- You need to use javadoc-style comments for your class fields.
Those of you who don't comment the purpose of your fields need to
- I was frequently disappointed by the use (or lack thereof) of
in-code comments. To review:
- You should always write a pseudocode version of each method before
writing the actual method. The pseudocode version should remain
as a series of comments.
- Every variable should include a comment noting its purpose.
- More confusing pieces of code also need separate comments.
- When possible, add a short comment to each right brace indicating
what structure you're ending.
- At some point in your program, you will probably need to talk about
overall structure and purpose so that a reader can understand how
your components interrelate. For this assignment, I knew about the
basic stuff, but someone else wouldn't have.
- I saw a number of problems with usage of exceptions. Will discuss
those in class.
- Many of you need to do better error testing. I've found that it's
best to write a simple interface to all of your functions and use that
- When you create separate "utility functions" for your functions, you
should separate them from your regular functions (and probably make
- In this and the next assignment many of
you were moving the current element without documenting it in your
- Don't print anything from your routines unless you have a very good
reason (and you've documented that you're going to do so in your comments
and postconditions). Note that many people who use your class may not
want extraneous text to appear on the screen.
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
Source text last modified Fri Dec 12 10:10:21 1997.
This page generated on Fri Dec 12 10:18:25 1997 by SiteWeaver.
Contact our webmaster at email@example.com