Question
Please do the following question using Java. Also please separate these into the separate classes (use Inheritance [extends...]): Vampire.java, Zombie.java, GeneralZod.java and finally MonsterTester.java. You
Please do the following question using Java. Also please separate these into the separate classes (use Inheritance [extends...]): Vampire.java, Zombie.java, GeneralZod.java and finally MonsterTester.java. You are also given the following abstract Monster.java class:
public abstract class Monster {
private int health; /** * Single-argument constructor * @param health The initial health of the monster. */ public Monster(int health) { this.health = health; } /** * Determine if the monster is dead (health
}
Given those, you have the following questions:
And for the tester:
2. A) (Vampire.java, Zombie.java, GeneralZod.java, MonterTester,java 25 marks) (15 marks) Consider the abstract Monster class that is given to you in the project file. This class defines the essential characteristics of Monsters that might be used in a game. Your jobs is to create three specific Monster classes-as described below - and to follow the standard rules of inheritance in doing so (override methods that need to be overridden, implement methods that need to be implemented, do NOT override or implement methods that are adequately implemented in the superclass, etc., etc.) Vampire: A vampire starts off with between 8 and 12 health. They aren't very healthy and they do only between 6 and 9 damage per turn. Zombie: Zombies are a bit tougher so they start off with health between 11 and 16. They also do a bit more damage - between 8 and 14 per turn. General Zod: General Zod is kind of a bad guy- he means well, but still... Thanks to the Earth's yellow sun his starting health is between 25 and 30 and he does a damaging 12 to 20 per turn. Make sure that each Monster has a toString) method for easy displayStep 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