Part I Create a Wizard class that has properties given below. • String name, int mana, int power. Write the necessary constructor, get & set, and toString methods. Part II Write an attack method for...


JAVA PROGRAMMING LANGUAGE


eclipse software



Part I<br>Create a Wizard class that has properties given below.<br>• String name,<br>int mana,<br>int power.<br>Write the necessary constructor, get & set, and toString methods.<br>Part II<br>Write an attack method for Wizard class that takes an integer parameter, i.e. spentMana.<br>The method returns (spentMana * power) and decreases the Wizard's mana depending on<br>spentMana.<br>Part III<br>Write a battle method for another class (Test) that takes two parameters: (1) Wizard<br>object, (2) an integer monsterHealth parameter. The Wizard object attacks until the<br>monsterHealth down to below zero.<br>

Extracted text: Part I Create a Wizard class that has properties given below. • String name, int mana, int power. Write the necessary constructor, get & set, and toString methods. Part II Write an attack method for Wizard class that takes an integer parameter, i.e. spentMana. The method returns (spentMana * power) and decreases the Wizard's mana depending on spentMana. Part III Write a battle method for another class (Test) that takes two parameters: (1) Wizard object, (2) an integer monsterHealth parameter. The Wizard object attacks until the monsterHealth down to below zero.

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here