Question: Assignment: RPG CharactersFor this assignment you will practice inheritance by creating an inheritance hierarchy of RPG character classes. The base class will be called character

Assignment: RPG CharactersFor this assignment you will practice inheritance by creating an inheritance hierarchy of RPG character classes. The base class will be called character and will have protected attributes for name, hp. mp. sthength, dexterity, intelligence, speed, endurance, and faith. It will also have functionality that represents a basic attack. The basic attack uses the character's strength stat to determine the amount of damage. The base class will have getters and setters for all attributes and a parameterized constructor.There will be four derived classes fighter, rogue, magician, and cleric. The derived class will determine the starting values for the attributes in the base class and each derived class has unique functionality.The fighter has strongAttack which combines their strength and endurance stats to determine the amount of the attack.The rogue has a steal ability which will steal from an enemy's hp and add to their own hp. The amount added to their hp is based on their dexterity speed and intelligence, and adds a random amount between 10% and 50% of the value of those combined stats. To get a random amount use rand) in estdlib (do not seed), and generate a number betwe and 50. Then take the number generated and divide by 100.0 to get the percent to use in the calculation.The magician has a cast ability which allows them to cast magic that attacks the opponent based on their intellgence and speed. It consumes mp.The cleric has the ability to heal which heals an ally based on the cleric's faith stat. Healing consumes MP.The umi diagram below shows all the spelling for all of the members of the classes. A pumi (plantum! file format) file has been included with the starter code which is screen readable. PLEASE WRITE THE CODE IN C++
 Assignment: RPG CharactersFor this assignment you will practice inheritance by creating

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!