download Pet.java and PetDriver.java from the attached links. Complete the Pet hierarchy as follows: Pet / | \ Dog Cat SmallAnimal / \ Hamster Rabbit All Pets can eat, sleep and play. Dogs can bark and dig. Cats can purr and scratch. Small Animals can chew. Hamsters can run on wheels. Rabbits can thump. After you complete all classes, run

PetDriver.java and ensure that your output matches the output attached. public class

PetDriver { public static void main(String[] args) { Cat oakey = new Cat("Oakey", 6, 18.5); Dog roxie = new Dog("Roxie", 12, 33.6); Hamster scooter = new Hamster("Scooter", 1, 0.3); Rabbit bigBunny = new Rabbit("Big Bunny", 9, 7.0); Pet thing = new Pet("Mystery Creature", 5, 10.0); System.out.println(oakey); System.out.println(roxie); System.out.println(scooter); System.out.println(bigBunny); System.out.println(thing); oakey.eat(); roxie.dig(); scooter.celebrateBirthday(); bigBunny.chew(); thing.play(); oakey.scratch(); roxie.eat(); scooter.runOnWheel(); bigBunny.thump(); thing.sleep(); } }

Q&A Education