Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN JAVA Here is the monster class import java.util.Scanner; public abstract class Monster implements Drawable, Loadable { private int x; private int y; private int
IN JAVA
Here is the monster class
import java.util.Scanner; public abstract class Monster implements Drawable, Loadable { private int x; private int y; private int health; protected Monster() { x = 0; y = 0; health = 100; } protected Monster(int x, int y, int health) { this.x = x; this.y = y; this.health = health; } public int getX() { return x; } public void setX(int x) { this.x = x; } public int getY() { return y; } public void setY(int y) { this.y = y; } public int getHealth() { return health; } public void setHealth(int health) { this.health = health; } @Override public void load(Scanner input) throws Exception { x = input.nextInt(); y = input.nextInt(); health = input.nextInt(); } }4 Create an Orc class that extends Monster. It should have the following PUBLIC methods: No-arg constructor (does nothing) Constructor that takes x, y, and health (calls super constructor from Monster Concrete implementation of Drawable method: voiod drawToMap(Map screen) If screen is nu, return. Otherwise, draw 'o' at (x,y) of 5 Create an Spider class that extends Monster It should have the following PUBLIC methods: No-arg constructor (does nothing) Page 3 of 9 Constructor that takes x, y, and health (calls super constructor from Monster) Concrete implementation of Drawable method: void drawToMap(Map screen) If screen is screen return. Otherwise, draw 's' at (x,y) of 4 Create an Orc class that extends Monster. It should have the following PUBLIC methods: No-arg constructor (does nothing) Constructor that takes x, y, and health (calls super constructor from Monster Concrete implementation of Drawable method: voiod drawToMap(Map screen) If screen is nu, return. Otherwise, draw 'o' at (x,y) of 5 Create an Spider class that extends Monster It should have the following PUBLIC methods: No-arg constructor (does nothing) Page 3 of 9 Constructor that takes x, y, and health (calls super constructor from Monster) Concrete implementation of Drawable method: void drawToMap(Map screen) If screen is screen return. Otherwise, draw 's' at (x,y) of
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started