added query methods to the Animal class. Put some test code at the bottom of the file.