Question: This question was already answered but the answer doesn't fulfill the requirements. Exercise 9.1.9: More Animals! Let's Go! For this exercise, you are going to
This question was already answered but the answer doesn't fulfill the requirements.


Exercise 9.1.9: More Animals! Let's Go! For this exercise, you are going to create a part of an Animal hierarchy. Unlike some of our examples and the previous exercises, this exercise is going to have 3 levels in the hierachry. At the top is the Animal class. Below that, we are going to have a subclass for Pets. Under pets, we are going to have 2 subclasses, Dogs and Fish You will need to create your class hierarchy and add instance variables, getters, and setter methods to accommodate the following information: I need to save what type of animal I have (String variable) . I want to be able to save a name for my fish and dog (String variable) I want to know which fish need salt water v. fresh water (String variable) . I want to know if my dog has been trained (boolean variable) . I want to know the size of my dog and fish (String variable) Make sure you use common sense names for your variables! Fish.java Pet.java Animal.java D Animal Tester.java Dog.java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
