Standards-3
Design and Algorithms


Major errors

Follow the design given in the assignment. [up to 100%]

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. [up to 60%]

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

Do not bypass the interface to a module [40 points each, 35% max]

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.

This is used to indicate an incorrect algorithm. [20-60 points each, 100% max]

Make sure that your algorithms are correct. Plan them before coding and test them thoroughly after coding.

Do not use the Standard Template Library or the string type. [3%-35%]

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 or in class. Types that must be implemented as part of an assignment must be implemented by you.

Scan for search [2-6 points each, 3% max]

You have used a scan algorithm for a problem that is better solved by a search algorithm. See lec13.html.

Minor errors

Organize your program in a sensible way. [10 points each instance, 10% max]

This means you have put a function in the wrong module,

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


Write simple things in simple ways. [6-12 points each, 3% max]

Avoid unnecessary complication in algorithms. Do not use an algorithm that is long and difficult to understand where there is a much simpler algorithm.

Do not use unnecessarily complicated coding. For example, suppose that you need an integer variable numSlots, initially 0. A sensible way to do that is as follows.

  int numSlots = 0;
An unnecessarily complicated way is as follows.
  int* numSlots = new int;
  *numSlots = 0;


Avoid long and complicated expressions [2 points each, 2% max]

Do not use long, complicated expressions that are difficult to read and understand. Do not make excessive use of ! in boolean expressions.