Question: In Java language please. You must create a general abstract Enemy class with the following fields: weight (an integer) e height (an integer) The Enemy

In Java language please.

In Java language please. You must create a general abstract Enemy classwith the following fields: weight (an integer) e height (an integer) The

You must create a general abstract Enemy class with the following fields: weight (an integer) e height (an integer) The Enemy class must also have the following methods: Getters for both the weight and height Setters for both the weight and height A constructor that takes the weight and the height An abstract method, attack, that (when implemented) will simply print out (using System.out methods) the specific attack of the subclass type In addition to the Enemy class, you should have four different concrete (non-abstract) classes that extend the Enemy class: Goblin o Weight should be generated randomly between 5 and 10 o Height should be generated randomly between 7o and 100 o The attack method should print "Gurgle!" . Ghost o Weight should be o o Height should be generated randomly between 9o and 150o o The attack method should print "Boo! . Ogre o Weight should be generated randomly between 120 and 200o o Height should be generated randomly between 200 and 300 o The attack method should print "Ugh!" Dragon o Weight should be generated randomly between 1000 and 1500 o Height should be generated randomly between 750 and 2000 o The attack method should print "Rawr

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!