you can have an abstract equals like method and in the parent class, call that method and compare each of the fields