ITEC 380 Style guidelines
-
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.
- Make source file lines 80 characters or less.
I will translate tabs to 4 characters.
- 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.
-
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).
- 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".
- Choose meaningful names.
-
Use any names that are specified in your assignment.
- Use constants, initialization, and other
language features as appropriate and as assigned.
- Use consistent capitalization.
Last modified: