Please include Precondition:/Postcondition: commenting at the beginning of every function in your program. State all assumptions on input arguments explicitly. State any changes that the function can make to any nonlocal variable explicitly. The importance of this practice cannot be overemphasized. The modularity and correctness of your program depend on its ability to follow these "contracts" that you define for each module. Therefore, the contracts must be exact.
Nested blocks of code should be indented 2 or 3 spaces to the right of their enclosing blocks.
The closing brace for a block must be aligned vertically either with its matching opening brace or with the first nonspace character of the line in which that opening brace appears. For example,
for (int i=1; i < M; ++ i) { // .... }and
for (int i=1; i < M; ++ i){ // .... }are both common and acceptable.
Please use the following capitalization conventions. Glaring inconsistencies may be penalized.
class DateClass{ .... }and
class Date{ .... }are both acceptable, though most people prefer the latter.
Date today;is preferred over
Date Today;Certain large objects (e.g., a table or a 2-D array) might be given capitalized names to emphasize their large sizes.
const int MAX_SIZE = 100;
int theBigOne = 7;But underscores are used to separate words in named constants, as in the preceding example.