Information Technology Reference
In-Depth Information
TABLE 10.A2
C
++
Coding Standards
Purpose
To guide implementation of C
++
programs.
Program Headers
Begin all programs with a descriptive header.
Header Format
/
****************************************************
/
/
*
Program Assignment: the program number
/
*
Name: your name
*
/
/
*
Date: the date you started developing the program
*
/
/
*
Description:
a short description of the program and what it
does
*
/
/
****************************************************
/
Listing Contents
Provide a summary of the listing contents.
Contents Example
/
****************************************************
/
/
*
Listing Contents:
*
/
/
*
Reuse instructions
*
/
/
*
Modification instructions
*
/
/
*
Compilation instructions
*
/
/
*
Includes
*
/
/
*
Class declarations:
*
/
/
*
CData
*
/
/
*
ASet
*
/
/
*
Source code in c:/classes/CData.cpp:
*
/
/
*
CData
*
/
/
*
CData()
*
/
/
*
Empty()
*
/
/
****************************************************
/
Reuse Instructions
- Describe how the program is used: declaration format, parameter
values, types, and formats.
- Provide warnings of illegal values, overflow conditions, or other
conditions that could potentially result in improper operation.
Search WWH ::
Custom Search