Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Add comments image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago