implemented davies L03 individual programming assignment part 2 into the Animal class