Answered step by step
Verified Expert Solution
Question
1 Approved Answer
create a simple text-based adventure game Jave program. 1. A Creature class with attributes name, description, hitPoints, damage, and room. A creature object can attack
create a simple text-based adventure game Jave program.
1. A Creature class with attributes name, description, hitPoints, damage, and room. A creature object can attack and take damage. It also has an isAlive() method and a toString() method.
2. A Player class that inherits Creature. A player has an attribute healAmount, and a heal() method that increase players hitPoints by healAmount.
3. A Monster class that inherits Creature. A monster as an attribute enrageThreshold, and will be enraged (double its attack damage) if its hitPoints falls below the threshold. It has methods canEnrage() and enrage().
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started