Chapter 7: Changing equals to check for Object's class as well.