Understand the problem

Have a clear idea of what the program or function is supposed to do. To test your understanding, make sure that
  1. you can state the program's purpose in one simple English sentence (say, at most 25 words, preferably 10).
  2. if somebody else had written the program, you could distinguish correct results from incorrect results.
Also think about how you would solve the problem if computers had never been invented.

If you're sitting at the computer, you can write down the statement of purpose in a Java comment, e.g.

/**
 *  cube : Find the cube (third power) of a number
 */
or
/**
 * howOld : produce a formatted message showing a person's name and how
 * old (s)he is.
 */

Last modified: Fri Jan 30 09:34:52 EST 2009
Stephen Bloch / sbloch@adelphi.edu