In addition to correctness, solutions will be graded for style and design. Additional detail is given below, but here are the key points:
const int MAX_SIZE = 30; // max # of dates const int LIMIT = 50; // limit of 50 – USELESS if ( x > 0 ) // check x is positive – USELESS
// capture behavior common to all birds that swim
public abstract class Waterfowl {
// move in pattern typical for this type of bird
public abstract void swim();
}
public void printResults(String[] items, int first, int last,
String key);
const int BUFFER_SIZE = 50; // max items to process
double toProcess[BUFFER_SIZE];
See below for a discussion of constants in tests.
distance += 10; // add ten to distance
are worse than useless - don't write a comment if its opposite is obviously
false.
Note there is no rule that only one class appear in a particular source file.
Some projects will require you to create Git repositories. Standards for these:
Debug/
Note that using non-standard build tools generally leads to checking in build products by mistake. Use the approved build tools.
By default, Windows is configured to not show extensions such as ".cpp" for file names. This causes problems for engineering students. See here to enable showing extensions.