An approach to coding a solution to an assignment:

  I would suggest dividing the problem into smaller problems, as in:

1.  Since the assignment already specifies how may functions there are to
      be, at this point decide what the names of those functions will be
      ("main" is alreay required), and begin declaring the symbolic constants
      and/or constant variables that will be used in the program.

2.  Then for each function named in 1. above, decide what argument(s) each
     will need.

3.  Then, prototype each function in the constants file.

4.  Then, stub in each function definition in the driver file, to match the
     prototypes in the constants file.

5.  Then compile each file and fix any errors/warnings that crop up.

6.  Then, flesh out the stubbed version of the next function you will need
     to call, and code in a call to that function in main().  HINT:  code in
     the function to read the input first.  Also, add any additional symbolic
     constants and/or constant variables that were not added earlier.

7.  Then, recompile and fix any errors/warnings, and also fix any errors in
     any output created by the call to that function.

8.  Then, return to step 6. above for the next function to be fleshed out.
     HINT: code in the print() function next, and use the output from the
     print() function to verify that all data has been stored/processed
     correctly.

9.  Once all functions have been defined and the output has been verified as
     correct, do the script session.

10. Then, print out the script session and look for errors that would show
     up on the printed page that did not show up in the edit sessions, and
     fix any such errors in the source code, and return to step 9. above.

11.  Once you are convinced the paper copy of the script session looks like
      what you want it to look like, it is ready to turn in on the due date
      in class.

                         --Ray


Updated 02.11.06