Rubric

Scored by the auto-test

The auto-test scores the items in this part. Each item earns its points in proportion to the share of its tests that pass. A method is correct when it does what its task page and the comment above it say; in a Measured class, that includes counting as Task 1 defines.

MeasuredArrayList (9 points)

  • add is correct. [1 point]
  • get is correct. [1 point]
  • set is correct. [1 point]
  • indexOf is correct. [1 point]
  • contains is correct. [1 point]
  • remove is correct. [1 point]
  • removeAt is correct. [1 point]
  • reset is correct. [1 point]
  • accesses is correct. [0.5 points]
  • mutations is correct. [0.5 points]

MeasuredArrayListTest (9 points)

  • The tests pass on a correct MeasuredArrayList. [1 point]
  • The tests catch the bugs in the buggy versions of MeasuredArrayList the auto-test runs them against. Catching 13 of them earns all the points; fewer earns a share. [8 points]

SelectionSort (3 points)

  • indexOfMax is correct. [1 point]
  • sort is correct. [2 points]

BubbleSort (3 points)

  • sort is correct. [3 points]

InsertionSort (3 points)

  • sort is correct. [3 points]

MergeSort (5 points)

  • merge is correct. [2 points]
  • The recursive sort(list, start, end) is correct. [2 points]
  • sort(list) is correct. [1 point]

MeasuredArraySet (2.5 points)

  • indexOf is correct. [0.25 points]
  • add is correct. [0.5 points]
  • contains is correct. [0.5 points]
  • remove is correct. [0.5 points]
  • reset is correct. [0.25 points]
  • accesses is correct. [0.25 points]
  • mutations is correct. [0.25 points]

MeasuredSortedArraySet (5 points)

  • insertionPoint is correct. [1.5 points]
  • isAt is correct. [0.5 points]
  • indexOf is correct. [0.5 points]
  • contains is correct. [0.5 points]
  • add is correct. [1 point]
  • remove is correct. [1 point]

MeasuredTransposeArraySet (3 points)

  • indexOf is correct. [0.5 points]
  • transpose is correct. [1 point]
  • contains is correct. [0.5 points]
  • add is correct. [0.5 points]
  • remove is correct. [0.5 points]

MeasuredMoveToFrontArraySet (15 points)

  • indexOf is correct. [1 point]
  • add is correct. [1 point]
  • closeGapFromFront is correct. [2 points]
  • closeGapFromBack is correct. [2 points]
  • moveToFront is correct. [4 points]
  • removeAt is correct. [3 points]
  • contains is correct. [1 point]
  • remove is correct. [1 point]

Graded by the teaching staff

The teaching staff grade the items in this part. An item may earn part of its points when it is partly met.

MeasuredArrayListTest (2 points)

  • MeasuredArrayListTest contains focused, appropriately named unit tests that each check one behavior and are ordered from the simplest to the most involved, as the testing chapter teaches. [2 points]

Part I: Counting accesses and mutations (8 points)

  • The analysis of SelectionSort is correct. [2 points]
  • The analysis of BubbleSort is correct. [2 points]
  • The analysis of InsertionSort is correct. [2 points]
  • The predictions are checked against the driver. [2 points]

Part II: Profiling the sorts (10 points)

  • Finds the mistake. [4 points]
  • Describes how the mistake was found. [3 points]
  • Draws conclusions about the sorts, backed by measurements. [3 points]

Part III: Searching the sets (7 points)

  • Explains the results of the uniform pattern. [2 points]
  • Explains the results of the skewed pattern. [2 points]
  • Shows, with a sequence of calls, how remove works against transpose. [2 points]
  • Explains why MeasuredMoveToFrontArraySet keeps the order when it removes. [1 point]

Part IV: Your search experiment (8 points)

  • The pattern in experimentQueries does what the question asks. [4 points]
  • Explains why the pattern works. [2 points]
  • Explains the difference between the first and the fastest run. [2 points]

Style (2.5 points)

  • The code uses only the language features and data structures the course teaches: no Java Collections, lambdas, or streams. [1 point]
  • The code exhibits good programming style: it is well organized and easy to read, uses descriptive names, keeps the given fields and method signatures, and adds no public methods. [1.5 points]

The auto-test scores 57.5 points and the teaching staff grade 37.5 points, for a total of 95 points.