CS/SWE 332 Assignment 10
Due Wednesday, November 8, 2017


Goal: Classes and Interfaces

Submit via Blackboard.
Assignment: Use Bloch's Item 16: Favor composition over inheritance to correct the problem with Liskov's Point2/Point3 example from last week's homework. Specifically

  1. Override equals() with Bloch's standard recipe.
  2. Override hashCode() (see Item 9: Always override hashcode when you override equals.)
  3. Write JUnit theories for symmetry, transitivity and hashCode. Supply appropriate Point2/Point3 data points.


Grading Criteria: