There are three grading categories when considering a programming assignment.
Compilation
If your code does not compile, a 50% penalty will be assesed from your score. However,
mere compilation does not grant 50% of your grade but only avoids penalty. If you believe
that a compilation error is out of your control, please see the professor or your TA for
help. Starting labs early will give you this advantage.
Correctness
80% of your score is based on the correctness of your lab. Correctness includes the
following aspects:
your code must produce the correct output. The output must conform to the lab
description. It is required that your code validates the input. In case of unvalid input,
your code must handle the errors in the manner specified in the lab description.
your code must exhibit acceptable object-oriented and top-down design.
your code must meet all lab specific requirements.
your code may not violate any project specific restrictions.
Style
The remaining 20% of your score is based on program design and style. Good style is
denoted writing general purpose methods, lack of redundant code (modularity),
error/exception handling and comments. Remember, "Programs must be written for people to
read, and only incidentally for machines to execute."
General Style Guide
Documentation/Comments
Your name and andrew userID are at top of the main driver
Each method has a description of it's behavior preceding the header
All variables are declared in the appropriate scope
No static variables unless there is a good reason to have them
Global constants (final static) are allowed
Descriptive names
Mandated variable naming convention:
Constant variable names should be in capital letters: e.g. public static final int
MAX_VALUE = 0;
For other variable names: The first character should be in lower case, capitalize only
the first character of each subsequent word: e.g. private int thisVariableHasAVeryLongName;
Methods
No static methods unless there is a good reason to have them
Descriptive method and formal parameters names
The statements in all methods are indented
Statements in control structures are indented
Use helper methods; they make your code readable
{ } guidelines
{ should either on it's own line lined up with the item whose block it
starting, or at the end of the line
} should be on it's own line -- exceptions are the do/while and else if