Added functionality for dog and cat
Merged dog.java