CSS 342 program grading rubric (primary trait analysis)
Trait 1: Student writes complete and correct programs (50%)
Students demonstrating this trait will turn in code that compiles correctly and meets all of the program specifications.†††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† ††
Trait 2: Student uses good programming practices (30%)
Students demonstrating this trait will write code with following properties:
∑ Object-oriented:† Objects should be self-contained with private data hidden. Methods should be public only when necessary. Do not circumvent information hiding by allowing operations that return internal, implementation-dependent data (e.g., pointers or reference to data members) unless appropriate.
∑ Efficient (time and memory): While small code optimizations are not important (and often counter-productive), the use of an efficient algorithm is crucial.
∑ Modular:† Each function should perform a single well-defined operation. If a function performs two tasks, break it into two functions. If a function (including main) performs a series of steps, each step should be a function.
∑ Fail-safe:† Do not allow users to access invalid data or crash the program, except where noted in specifications.
∑ Miscellaneous:† Use const member functions whenever possible. When passing by reference, use const whenever possible. Do not use global variables. Global constants are acceptable. Eliminate compiler warnings when possible. Write portable code (i.e., donít make assumptions about the compiler). Do not have memory leaks.
Trait 3: Student writes code that is easy to understand (20%)
Students demonstrating this trait will write code that is easy to understand by:
∑ Describing the contents of each file at the beginning of the file. Describe the purpose of each class (or other code), the functionality, and any assumptions made. Give the author and a brief description of code use.
∑ Documenting the purpose, pre-conditions and post-conditions for each function (including main). Make sure the input and output (parameters) are clear. Documentation should be included at both declaration and definition. (The use of doxygen-style tags is acceptable, but not required.)
∑ Documenting each logical code block within each function when performing non-obvious operations.
∑ Using indentation appropriately and consistently to delineate code blocks.
∑ Using meaningful function and variables names. Grouping similar or related functions together.
∑ Using correct spelling and grammar in all documentation, including function and variable names.
∑ Naming class files with the same name as the class (e.g., Student.h, Student.cpp or student.h, student.cpp).
∑ Using appropriate white space between functions and logical code blocks.
∑ Using white space within lines of code. Operators such as = and + should have a space on either side. In for statements use spaces between expressions.
∑ Writing lines of code with reasonable length (limit these to 80 characters, using a return when appropriate). Break long lines into shorter lines when possible.
†(Note that grades can and will be given in between the levels noted above in each trait.)