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.
Score
Level
1: Most of the program has been implemented, but does not compile correctly: 20
Level 2: The program compiles
correctly, but crashes during basic testing: 25
Level
3: The program runs, but fails to meet several of the specifications: 30
Level
4: The program runs, but fails to meet 2-3 specifications 35
Level
5: The program runs, but fails to meet a specification or makes major errors 40
Level
6: The program runs, but makes a major error or crashes during stress testing 45
Level
7: The program runs, but makes a minor error handling one case: 48
Level
8: The program is complete and performs all
operations correctly: 50
Trait 2: Student writes code that is easy to
understand (25%)
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 method (including
main). Make sure the input and output (parameters)
are clear.
·
Documenting each
logical code block within each method when performing non-obvious operations.
·
Using indentation
appropriately and consistently to delineate code blocks.
·
Using meaningful method
and variable names.
·
Grouping similar
or related methods together, both spatially and/or with respect to class construction.
·
Using appropriate
white space between methods 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.
Grade
Level
1: Documentation is present, but does not consistently adhere to the standards: 12
Level
2: Documentation is somewhat understandable, but needs improvement in areas: 18
Level
3: Documentation is understandable, but could be improved in at least one area: 22
Level
4: Documentation is very understandable and adheres to all of the above standards:
25
Trait 3: Student uses good programming practices (25%)
Students demonstrating this
trait will write code with following properties:
·
Object-oriented: Objects should be straightforward abstractions, well-encapsulated (self-contained) with internal state made private
Methods should be public
only when necessary. Do not circumvent
information hiding (e.g., by returning a reference to a data member, or overuse of singletons ).
·
Efficient (wrt space and time): 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 (1) invalidate the state of your objects, (2) access invalid data or
(3) crash the program, except where noted in specifications.
·
Miscellaneous: Do not use global variables. Global constants are acceptable. Use constants rather than “magic numbers” in
code.
Grade
Level
1: The code adheres to at least two of the standards:
12
Level
2: The code adheres to three of the above standards
18
Level
3: The code is good, but could use improvement in at least one area:
22
Level
4: The code is well-written and adheres to all
of the above standards:
25
(Note
that grades can and will be given in between the levels noted above in each
trait.)