6.15. Design Requirements

Follow the design given in the assignment. [Design: 1-100 points]

Your program must follow the design explained in the assignment. Failure to do that can lead to an arbitrary number of lost points. If the assignment says you must have a function called length with one parameter, write a function called length with one parameter, and make it do what the assignment says it must do.

Make the program do the right thing. [Functional requirements: 1-100 points]

Your program must do what the assignment says it must do. Don't make it do something else.

Organize your program in a sensible way. [Organization: 1-8 points]

This means your program is organized incorrectly. For example, you might have put a function in the wrong module, or jobs are not broken down among functions in sensible ways.

Most of the assignments have fairly rigid designs. Follow the designs.


Avoid long functions. [Long-function: 1-30 points]

Limit a single function definition to no more than 15 noncomment lines, excluding the function heading.

A noncomment line is defined to be a line that has at least two noncomment, non-white-space characters. For example, a line that only contains a brace does not count as a noncomment line by this definition.

Do not violate other requirements in order to squash a long function definition down. Break the function up into smaller functions and document each function.


Read from the source required in the assignment. [Input-source: 1-5 points]

This means your program reads input from the wrong place.

Write to the destination required in the assignment. [Output destination: 1-5 points]

This means your program writes output to the wrong place.

Do not use the Standard Template Library or the string type. [Standard-Template-Library: 1-50 points]

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 [Violate interface: 10-20 points]

Only use features of a module that are part of its interface. Do not use private features that are not described in its interface. This is particularly important when a module implements an abstract data type.