Question: Add comments SKILL SET: Using abstract base classes, polymorphism and virtual functions Write a program that uses class, inheritance, and polymorphism to have three different
SKILL SET: Using abstract base classes, polymorphism and virtual functions Write a program that uses class, inheritance, and polymorphism to have three different kinds of characters battle in a simple game. There are three different types of characters A Novice has the following data Name * Health points (HP) starts at 100 Experience points (XP)- starts at 10 Name of Master A Master has the following data: Name Health points (HP) starts at 100 Experience points (XP)-starts at 10 . Wcapon name .Weapon power A Wizard has the following data: Name Health points (HP) starts at 100 Experience points (XP)-starts at 10 Weapon name Weapon power Power source (divine, arcane) . When fighting during the game, a character generates attach points as described below. If the points generated by getAttack are greater than the monster's armor class points, the player wins the battle. XP are updated as shown in table below (information on using rand0 and srand0 is at the END of this document) Novice Master Wizard attributes Attack pointsA number from A number from A number from 10 - 25 1-20 5-25 Plus weapon points Plus weapon points Plus magic bonus (2 points if arcane, 5 points if divine) +8 when battle won XP +2 when battle +5 when won L ses 30% of value when battle lost battle won Loses 20% of value when battle lost HP Loses 10% of value when battle lost behaviors print o Print all the Print all the Print all the data for data for that data for that that character character Generates attack points attack points points as indicated character Generates getAttack Generates attack above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
