Homework 5


80 pts., due Apr. 12

For each program, you should turn in the source code and a print-out showing a sample run (print the output window). Follow the guidelines in Section 3.7 for the style of your programs. In addition:

  1. Use descriptive names for variables and named constants. In addition, write a brief comment for each variable and named constant describing how it is used.
  2. Use uppercase characters for named constants with underscores to separate ``words.'' Use lowercase characters for variables with either underscores or capitalization to separate ``words.''
  3. If a formula you use in a statement isn't obvious, comment it. In general, comment any non-obvious statement or statement block.

Documentation will account for 30% of your grade.

The problem is Programming Problem 4 on page 273. Follow the instructions at the beginning of the Programming Problems section. You need not draw a structure chart. You should design your solution in a top-down fashion, but implement it in a bottom-up manner so that you can test it one piece at a time.

Your design should be complete when you return from spring break. You will need two or three days to implement your solution.

Thomas P. Kelliher
Sat Mar 23 11:31:18 EST 1996
Tom Kelliher