Benchmarks to evaluation of exam programs:
-
[45=] Full satisfaction of question requirements:
-
[+32] correct math for "any" number of charges
-
[+2] validation, including:
(a) observation point at charge location; (b) number of charges <=0 or
greater than the program can afford
-
[+10] user interface allowing to calculate the potential at multiple
locations without re-entering coordinates and magnitudes of charges
-
[-0] designated named variable or symbolic constant for parameter A
(-0.5 if value is typed directly in formula)
-
[+1] structure and style are up to a 100%-worth program
-
[max of 42] if multi-point interface is not implemented:
-
[+32] math
-
[+2] validation
-
[+5] user interface allowing to enter all the parameters
-
[+3] structure, style, advanced programming techniques (e.g. C++ classes)
-
[33] Simple Passing-Guaranteed program: no user interface, no advanced
features, hard-coded non-special set of data
(necessary to demonstrate correct summation).
-
[22] Basic program not qualifying to the above, but
working correctly in the single charge case (fixed data, no interface)
-
[up to +10] for UI and good programming practices
Reductions:
-
-10% failure to write any program information on exam sheet
-
-5% failure to write program location on exam sheet
-
-10% missing title comments
-
-12% title comments with wrong authorship
-
-25% uncompilable program, if error causing uncompilability is easy to
fix (otherwise, point loss is higher)
-
-0.5..-3 pts syntax and programming errors
-
-5 pts failure to organize summation loop
In the posted solutions, Sergey's passing-guaranteed program
would be worth 33.5 pts (0.5 for debugging output, which is
a good programming practice here, because the program is not "finished").
Shannon's program would get the full mark of
45 (-0.5 for unneccesarily long main()
offset by demostration of good skills in working with files).