Question: **Language is java** The goal of this assignment is to build off of the code that was discussed in class. The code represents the following

**Language is java** **Language is java** The goal of this assignment is to build off

The goal of this assignment is to build off of the code that was discussed in class. The code represents the following inheritance Hierarchy: Problem #6 - Add a Mutator method to the Cat class called setBreed() that uses a parameter to allow the user to set the breed of the cat. Animal Problem #7 - Add an accessor method to the Cat class called getBreed() so that the breed can be looked up. Problem #8 - Edit the Fish class so that the type of fish can be stored (default"). Cat Pir Problem 99-Add a Mutator method to the Fish class so that the user can edit the type of fish represented. Problem #1 - Create two new classes: one called Fish and the other called Shark (a total of 6 classes located in the same package) Create these two classes so that the following Inheritance Hierarchy exists: Problem #10 - Add an accessor method to the Fish class called getType() so that the type of fish can be found. Animal Problem #11 - Add a method to the Fish class called swim(). This method should output the following statement when called: The fish is swimming... Cat Fish Pig Problem #12 - Add a method to the Fish class called fishNoisel)This method should output a statement that represents some sort of fish noise Shark Problem #2 - Edit the Animal class so that it also includes a String variable that tracks the animal's color. When an animal is constructed, the color should be set Problem #13 - Add an instance variable to the Shark class called attack. This variable will track whether or not the shark is attacking at the moment (boolean). to Problem u14 - Add a mutator method to the Shark class that changes the current attacking state of a shark. Problem #3 - Add a Mutator method to the Animal class called setColor(). This method needs to have a parameter so that the user can set the color of the animal to their desired color Problem #15 - Add an accessor method to the Shark class that checks to see if a shark is currently attacking Problem #4 - Add an accessor method to the Animal class called getColor ) so that the color of all animals can be accessed when needed. Problem #16 - Return to your main class. Write code to test that you are able to successfully create and manipulate all items in the Inheritance Hierarchy: Animal.Cat, Fish, Pig, and Shark. Also verify that all methods in all classes are working properly Problem #15 - Edit the Cat class so it now also tracks what breed of cat it is (Siamese, Persian, etc.). When a cat is constructed the default breed should be

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!