6.10. Other Requirements

Your program should compile without warnings [WARN]

Avoid compiler warnings. They usually tell you about an important issue with your program.

Follow the design. [DESIGN]

Your program must follow design and other nonfunctional requirements given with the assignment.

Use margin comments only sparingly [MARGIN]

Margin comments are placed in the right margin after a line of code. Do not use them, except when they are short and improve readability. If you have something worth saying, do not marginalize it, but write it in a comment line or paragraph just before what it describes. You can describe more than one variable in a single comment where it is sensible.

Avoid code duplication [DUP-CODE]

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

End the last line [EOL]

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

Do not use the Standard Template Library. [LIBRARY]

This course is concerned not just with how to use data structures, but with how to create them. Only use library types that are explicitly approved in the assignment. Types that must be implemented as part of an assignment must be implemented by you.

Do not bypass the interface to a module [INTERFACE]

Only use features of a module that are part of its interface. Do not use private features that are not described in its interface.

Do not use instance methods or static methods [INSTANCE]

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.

Do not go outside of either physical or logical array bounds [ARRAY-BOUND]

Do not use an array index that is outside of the array bounds. If only a prefix or suffix of an array has relevant information in it, only look at the relevant information. For example, if you have created an array of physical size 100, but you have read information into the first 30 slots, then do not do a loop over all 100 slots just to see those 30 values.