"The equals method should check whether the passed object is a Solution object." Per the stated condition, why does code that uses getClass() check not pass but the instanceof check does? Strictly speaking the instanceof operator is not checking to see if the passed object is a Solution object, but if it is an instance of it, which means subclasses of Solution would be as valid as their parent. I understand this may be a desired property, but
getClass() != o.getClass()
should also pass right?