ITEC 380 Style guidelines

  1. Each source file must include a header comment that contains your name, the date, the course, and a brief description of the contents of the file. The header for the file that includes the code where execution begins must also contain a description of the overall purpose of the program.

  2. Make source file lines 80 characters or less. I will translate tabs to 4 characters.

  3. Use white space (ie indentation, spacing, and blank lines), consistently and effectively to enhance the readability of your program. You may want to follow the examples shown in your text.

  4. For each routine (or, for very short routines, each group of routine definitions) include a header that makes the routine stand out visually and that describes its purpose, and any other important information about it (eg, where the its algorithm was obtained).

  5. Each related section of code must have a comment that describes the purpose of that code. Do not just repeat the text of the code in your comment; instead describe the purpose of the statement(s) in terms of the problem you are trying to solve. For example, say "count number of people" rather than "add 1 to numPpl".

  6. Choose meaningful names.

  7. Use any names that are specified in your assignment.

  8. Use constants, initialization, and other language features as appropriate and as assigned.

  9. Use consistent capitalization.


Last modified: