wrote and tested Animal and AnimalTest.java