Exam 1

Exam 1 is due at the beginning of class Tuesday: [PDF] [Word Template]

This entry was posted in Exams. Bookmark the permalink.

3 Responses to Exam 1

  1. mkd5m says:

    For #4, in the overview of the MultiSet type, it states “where the set braces mean the collection is ordered.” Should this say unordered?

  2. David Evans says:

    Several people have asked questions about the abstraction function for HashMap:

    private HashMap map;
    // Abstraction function:
    // AF(c) = { x_1, …, x_n } where
    // forall key: rep.map()
    // the value of key appears in x map.get(key) number of times.

    This is a bit confusingly worded since I didn’t define what “x” is here. By x, I mean the set { x_1, … , x_n} that is the abstract representation of the multiset. So, if say, map.get(3) = 7 then the value 3 (key) appears in this set (x) 7 times.