CSU 213 Assignment 0: Spring 2007

Grading Rubric: Total = 30 points


Problem 1.1 10 points total
2 points for function distance: Posn Posn -> Number 1 point -- purpose and contract 1 point -- examples/tests 4 points for function total-distance: (Listof Posn) -> Number 1 point -- if zero for empty and list of one Posn (with tests) 1 point -- if accumulator function is then invoked 1 point -- purpose and contract 1 point -- examples/tests for this function 4 points for function total-dist-acc: (Listof Posn) Number -> Number 1 point -- purpose and contract 1 point -- the role of the accumulator is explained 1 point -- examples/tests 1 point -- body
Problem 1.2 8 points total
4 points for function min-distance: (Listof Posn) -> Number | Error 1 point -- if empty list and list of one Posn is handled OK (error, or distance zero, but does not affect the rest) 1 point -- if accumulator function is then invoked 1 point -- purpose and contract 1 point -- examples/tests for this function 4 points for function min-dist-acc: (Listof Posn) Number -> Number 1 point -- purpose and contract 1 point -- the role of the accumulator is explained 1 point -- examples/tests 1 point -- body
Problem 2 12 points total
3 points for examples of a BST and a correct data definition The actual method is quite hard to design. If they designed it using accumulators (as shown below - or somewhat like that): 3 points for the main function 1 point -- purpose and contract 2 points -- for examples for the main function 4 points for function with accumulator 1 point -- purpose and contract 1 point -- explanation of the accumulator 1 point -- body deals correctly with the left side 1 point -- body deals correctly with the right side 2 points for examples for the accumulator function If they used 'append' and recursion only: 4 points for the function 1 point -- purpose and contract 1 point -- Body OK 2 points -- for examples (i.e. max 7 points total if no accumulators are used)