Question: code should be written in java In this exercise, you have to use java Interface. Imagine you are writing a computer game that involves a
In this exercise, you have to use java Interface. Imagine you are writing a computer game that involves a hero who encounters various monsters. Monsters have several characteristics: hit points, strength, age, and name (the class Monster.jova is supplied). The number of hit points a monster has is how far it is from death. A monster with a large number of hit points is hard to kill. Similarly, the hero also has hit points. When the hit points of the hero reach zero, the game is over. The strength of a monster affects how many hit points the hero loses when the monster hits the hero. The age and name of the monster do not affect the outcome of battles between the monster and the hero. make the necessary changes to the Monster class (supplied with this lab) and write a tester (client) class with main method that will present the hero with monsters in increasing order of difficuity. Hints: Monster needs a compareTol) method
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
