6.14. Other Requirements

Your program should compile without warnings [WARNINGS: 1-3 points]

Avoid compiler warnings. They usually tell you about an important issue with your program. Since I will compile with warnings turned on, you should also turn them on. That you chose not to request warnings is not an excuse for ignoring them.

Do not include prototypes for functions that are not exported in header files. [ADVERTISE-PRIVATE: 1 point]

If a module has a well-defined interface, do not unnecessarily add information to its header file that is not part of the interface.

Avoid code duplication. [DUP-CODE: 1-5 points]

Do not unnecessarily duplicate sequences of code that are more than two lines long. Use a function.

End the last line of output. [EOL-AT-END-OF-OUTPUT: 1 point]

Your program should write an end-of-line at the end of what it writes.

The main function should return a result. [MAIN-RETURN: 1 point]

Main returns 0 if all went well and nonzero if there was an error.

Do not use instance methods or static methods. [INSTANCE-METHOD: 1-6 points]

Do not use classes or create instance methods or static methods within a structure definition. Constructors in structure definitions are allowed.

This course is concerned mainly with physical data structures, although it also covers an introduction to abstract data types. Object-oriented programming is covered in CSCI 3310. Since we cannot take the time in this course to discuss object-oriented programming, and students who have attempted to use it have almost always used it incorrectly, do not try to use object-oriented programming.