Full size, professional programs require at least three documents. These are the Program Design Document, the User's Manual and the Technical Reference Manual. In this course, you may combine these documents into a single one, since your programs will be relatively short and simple. Your documentation should contain the following sections:
Your documentation should be neatly prepared and be in a binder with a clear cover. Computer printouts should be inserted into the binder so that they can be easily examined. Your folders will be returned after grading.
The following information must appear in your programs.
a) Program Header - The program header introduces your program. It should be formatted as follows:
! Program (Module or Subprogram) Name: xxxxx
! Version: x.y
! Last Revised: (date)
! Filename: (of this source code file)
!
! Student (or Programmer): (Your name goes here)
! Course and Assignment Numbers: CS-185 Program z
!
! (A brief description of what this program does and how it does it.
! Include information about data file names and formats, program
! limitations, etc.)
!
! (revision history if any)
!
! Variables: (A complete list of the variables used in the program and
! their meanings. Include types and units (feet, kg, W, dollars,
! etc.) of all variables having units. For example,)
!
! real Engine - Size of engine in Cu.In.'s
! real Max_Speed - Maximum speed in RPM.
b) Other Comments - Your program must contain enough comments to make its operation easy to understand. Every major section should begin with a block of comment lines explaining what the section does. You can generally identify major parts of your program by looking at the early versions or the pseudo code you wrote while designing it. Comments may also be needed on the same line as particularly important statements. For example,
!
! Get user input
!
...
READ(*,*) Make, Model, Year ! Get information about the car
...
!
c) Other Documentation - A logical program design, consistent indentation and mnemonic variable, subroutine and function names go a long way toward creating a well documented a program.