Question: Write a static Java method called (attack that takes a Character parameter named character, and invokes the attack method of the Character. (b) Now,
Write a static Java method called (attack that takes a Character parameter named character, and invokes the attack method of the Character. (b) Now, write a main method that creates a single ArrayList with instances of each of the different Character classes from ( (i.e. Warrior, Mage, Archer) and then loops over the ArrayList invoking the static method named attack described in (a).
Step by Step Solution
3.41 Rating (154 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
