Question: Hello! I need to have this java project created in Netbeans, could you help me out? Create a text-based (not GUI) java application that defines
Hello! I need to have this java project created in Netbeans, could you help me out?
Create a text-based (not GUI) java application that defines game character objects as follows:
Create an abstract class that defines a Character object with attributes for a name, gold amount, and health rating. (2 points)
Include at least one constructor, as well as appropriate get and set methods and a toString method. (3 points)
Now create a sub-class named Wizard that extends the Character class and adds a spellsattribute along with at least one constructor, appropriate get and set methods and a toString method. (3 points)
Create another sub-class named Elf that adds an arrows attribute along with at least one constructor, get and set methods and a toString method. Use your own character types and attributes if you prefer. (2 points)
Your actual app should work with Elf and Wizard objects as follows:
Allow the user to choose a type of character (Wizard or Elf) and a name for the character. (3 points)
Create an instance of the character using the name provided and also assigning 25 pieces of gold and a random health rating between 1 and 10 (3 points)
Invite the player to purchase a number of spells or arrows (appropriate to the character type) for a price. Use instance methods as needed to check they have enough gold, increases the number of spells or arrows, and reduces their gold amount based on this purchase. (3 points)
Include your Validator class to validate the user input. (3 points)
Finally the app should call the instance's toString() to display a report of the current status of the character (name, health, gold, and number of spells or arrows (depending on the character). You can do this any way you want as long as you work with the the Elf or Wizard instance (whichever the user selects). (3 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
