Question: Upload four java files here based on the instructions provided in the attached worksheet: * FishBot class (called FishBot.java) * Updated SharkBot class (called SharkBot.java)

 Upload four java files here based on the instructions provided inthe attached worksheet: * FishBot class (called FishBot.java) * Updated SharkBot class

Upload four java files here based on the instructions provided in the attached worksheet: * FishBot class (called FishBot.java) * Updated SharkBot class (called SharkBot.java) * Updated MinnowBot class (called MinnowBot.java) * MegaSharkBot class (called MegaSharkBot.java)

APCS A Abstract Class HW Name Date Period 1) Below are two classes, SharkBot and MinnowBot: public class SharkBot extends Better TurnerBot { Il constructor not shown public void eat() { findFood; pickBeeper(); } public class MinnowBot extends Better TurnerBot { // constructor not shown public void eat() { findFood(); pickBeeper(); } // precondition: SharkBot is at a location that // contains 2+ beepers private void pickBeeper() { super.pickBeeper(); super pickBeeper(); } // finds a beeper public void findFood { // implementation not shown (though different // from SharkBot's findFood) } // finds a beeper public void findFood { // implementation not shown (though different // from MinnowBot's findFood) } public void flee() { move(); move(); move(); move(); move(); } } public void move) { super.move(); super.move(); } } Based on our discussion on abstract classes, create an abstract class called FishBot that abstracts out the common code from SharkBot and MinnowBot. Edit your SharkBot and MinnowBot classes to appropriately represent the inclusion of this abstract class (by creating abstract methods as appropriate and removing methods with identical implementation) as well as represent a more appropriate inheritance hierarchy. public abstract class FishBot extends { 2) A MegaSharkBot is a SharkBot that moves twice as fast and eats twice as much as a SharkBot does. With this information, write the complete MegaSharkBot class. APCS A Abstract Class HW Name Date Period 1) Below are two classes, SharkBot and MinnowBot: public class SharkBot extends Better TurnerBot { Il constructor not shown public void eat() { findFood; pickBeeper(); } public class MinnowBot extends Better TurnerBot { // constructor not shown public void eat() { findFood(); pickBeeper(); } // precondition: SharkBot is at a location that // contains 2+ beepers private void pickBeeper() { super.pickBeeper(); super pickBeeper(); } // finds a beeper public void findFood { // implementation not shown (though different // from SharkBot's findFood) } // finds a beeper public void findFood { // implementation not shown (though different // from MinnowBot's findFood) } public void flee() { move(); move(); move(); move(); move(); } } public void move) { super.move(); super.move(); } } Based on our discussion on abstract classes, create an abstract class called FishBot that abstracts out the common code from SharkBot and MinnowBot. Edit your SharkBot and MinnowBot classes to appropriately represent the inclusion of this abstract class (by creating abstract methods as appropriate and removing methods with identical implementation) as well as represent a more appropriate inheritance hierarchy. public abstract class FishBot extends { 2) A MegaSharkBot is a SharkBot that moves twice as fast and eats twice as much as a SharkBot does. With this information, write the complete MegaSharkBot class

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!