Assignments 3 and 5 were paired, and assignments 4 and 6 were paired. This means the higher of your two grades for assignments 3 and 5 was used as your grade for each of those two assignments, and the higher of your two grades for assignments 4 and 6 was used as your grade for each of those two assignments.
If your score on the final exam's 21-point programming problem was higher (after the pairing explained above) than your score on some homework assignment, and your score on that assignment was less than perfect, then your score on the final exam's programming problem was used in place of your score on one of the homework assignments (up to the number of points possible for that assignment, usually 20).
The midterm exam was not curved. The final exam was curved by adding 6 points to your uncurved score.
Details of the calculation are written in Scheme.
The final exam's programming problem was interesting enough to deserve some post-exam discussion.
iterator()
returns an instance of a class that implements Iterator
Iterator<BLT>, but only 1 point if it
claims only to implement Iterator
hasNext() method
with the correct type and returns a value of the correct type
Next() method
with the correct type and returns a value of the correct type
remove() method
with the correct type
iterator() method creates an instance
of that class
next() method throws a
NoSuchElementException
if and only if hasNext() is false
remove() method throws some kind
of exception or actually removes something
Iterator
would be adequate to generate all subtrees
if their declared (or reasonably obvious) invariants were to hold;
less than half the class got this right
hasNext() method
interprets the instance variables correctly
and returns the correct result;
this is not possible unless the instance variables are adequate
next() method
updates the instance variables correctly;
this is not possible unless the instance variables are adequate
next() method
returns the correct results;
this is not possible unless the instance variables are adequate
BLT to maintain the state of the iterator.
(An instance variable of type BLT can be adequate, but only
when combined with an invariant that uses the BLT to represent
a stack of BLTs or something similar; none of the students who
used an instance variable of type BLT were able to think of an
adequate invariant.
The grading of this problem was made simpler by the
Patterson-Hewitt theorem, which says that no finite
amount of auxiliary state will help; you have to use
recursion somewhere, or else simulate recursion with
a stack or similarly unbounded data structure.)