CMSC 202 OOP Coding Standards

These coding standards deal specifically with C++ programs that use classes.

File Organization


Documentation

Every file, whether a .H or .C file, must contain a file header comment as described in the General C++ Coding Standards.

The header file for a class presents the public interface for the class. Therefore, we adopt the convention that class member function header comments are done in the header file. However, implementation file member function bodies should still contain comments.

For an example of header file documentation, see the heap.H file that was given to you for Project 2. You are encouraged to adopt this sample style. If you prefer your own style, that is acceptable, but it must meet the specifications laid out here.


Style