In: Computer Science
JAVA programming - please ONLY answer prompts with java code *Inheritance* will be used in code
Classwork
A zoo is developing an educational safari game with various animals. You will write classes representing Elephants, Camels, and Moose.
Part A Think through common characteristics of animals, and write a class ZooAnimal.
☑ ZooAnimal should have at least two instance variables of different types (protected), representing characteristics that all animals have values for.
☑ It should also have at least two methods for behaviors that all animals do; these can simply print out a String stating what the animal is doing. (accessors and mutators are not behaviors). Include at least one parameterized constructor. Part B
☑ Create classes Elephant, Camel, and Moose, all of which extend ZooAnimal. In each, include a default constructor that calls the parameterized superclass constructor
. ☑ To one class (of Elephant, Camel, and Moose), add another instance variable specific to that type of animal. To another, add another behavior method. In a third, override a behavior from ZooAnimal. Part C
☑ Create a test harness for the animal classes. In a main create at least one Elephant, Camel, and Moose, and show which behavior methods are usable for each.
☑ [EC+10] Create another animal class inheriting from one of your three types (doesn't have to be zoologically accurate, but should make some sense), and either add an instance variable or add or override a method. This class should also be tested in the harness.