CS/SWE 332 Assignment 11
Due Wednesday, November 15, 2017

Goal: Favor composition over inheritance. Bloch Item 16.

Submit via Blackboard.

Consider the InstrumentedSet example from Bloch Item 16 (as well as in-class exercise #21).

  1. Replace sets with collections. equals() no longer satisfies its contract.
  2. Now consider the example: In either case, is there a problem with equals()? If so, give a JUnit test. If not, why not? If you're not sure, simply run the code.

Grading Criteria: