CS/SWE 332 Assignment 11
Due Wednesday, November 15, 2017
Favor composition over inheritance. Bloch Item 16.
Submit via Blackboard.
InstrumentedSet example from
Bloch Item 16 (as well as in-class exercise #21).
- Replace sets with collections.
equals() no longer
satisfies its contract.
Explain why there is a problem.
Demonstrate the problem with a suitable JUnit test.
- Now consider the example:
In either case, is there a problem with
If so, give a JUnit test.
If not, why not?
If you're not sure, simply run the code.
Correct yes/no answers.
Reasonable JUnit tests.
The GTA can easily navigate your solution.