Description:
1. The sub-questions below concern a Java application that deals with monsters.
i) Create a class called Monster (to be stored in file Monster.java), such that:
Every monster has a name and,
Every monster can attack and move (i.e. the class Monster has two methods, attack()
and move()).
A generic monster attack() method should return a random integer value between 1 and 5. It
should also print the following message to the console:
“NAME, of type CLASS_TYPE, attacks generically: X points damage caused.”
where:
NAME = monster name
CLASS_TYPE = class of monster1
X = random integer in the specified range
The monsters’ generic move() method should be defined as follows:
public void move(int directio
To Search:
File list (Check if you may need any files):
1\Dragon.java
.\Monster.java
.\MonsterMash.java
.\Troll.java
1