Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please make sure it works according to the output. Output and Client are provided thanks! Client: int main() { srand(time(0)); human h1; elf e1; cyberdemon

image text in transcribedimage text in transcribedPlease make sure it works according to the output. Output and Client are provided thanks!

Client:

int main() { srand(time(0)); human h1; elf e1; cyberdemon c1; balrog b1; human h(20, 30); elf e(40, 50); cyberdemon c(60, 70); balrog b(80, 90); cout  

Here is the correct output. Your output should match this exactly except where random numbers are used.

default human strength/hitpoints: 10/10 default elf strength/hitpoints: 10/10 default cyberdemon strength/hitpoints: 10/10 default balrog strength/hitpoints: 10/10 non-default human strength/hitpoints: 20/30 non-default elf strength/hitpoints: 40/50 non-default cyberdemon strength/hitpoints: 60/70 non-default balrog strength/hitpoints: 80/90 Examples of human damage: The human attacks for 8 points! Total damage = 8 The human attacks for 13 points! Total damage = 13 The human attacks for 1 points! Total damage = 1 The human attacks for 14 points! Total damage = 14 The human attacks for 10 points! Total damage = 10 The human attacks for 1 points! Total damage = 1 The human attacks for 18 points! Total damage = 18 The human attacks for 12 points! Total damage = 12 The human attacks for 20 points! Total damage = 20 The human attacks for 8 points! Total damage = 8 Examples of elf damage: The elf attacks for 22 points! Total damage = 22 The elf attacks for 32 points! Total damage = 32 The elf attacks for 38 points! Magical attack inflicts 38 additional damage points! Total damage = 76 The elf attacks for 11 points! Magical attack inflicts 11 additional damage points! Total damage = 22 The elf attacks for 16 points! Total damage = 16 The elf attacks for 27 points! Total damage = 27 The elf attacks for 22 points! Magical attack inflicts 22 additional damage points! Total damage = 44 The elf attacks for 38 points! Total damage = 38 The elf attacks for 1 points! Magical attack inflicts 1 additional damage points! Total damage = 2 The elf attacks for 5 points! Magical attack inflicts 5 additional damage points! Total damage = 10 Examples of cyberdemon damage: The cyberdemon attacks for 30 points! Total damage = 30 The cyberdemon attacks for 36 points! Total damage = 36 The cyberdemon attacks for 37 points! Demonic attack inflicts 50 additional damage points! Total damage = 87 The cyberdemon attacks for 7 points! Total damage = 7 The cyberdemon attacks for 10 points! Total damage = 10 The cyberdemon attacks for 14 points! Total damage = 14 The cyberdemon attacks for 6 points! Total damage = 6 The cyberdemon attacks for 25 points! Total damage = 25 The cyberdemon attacks for 16 points! Total damage = 16 The cyberdemon attacks for 13 points! Total damage = 13 Examples of balrog damage: The balrog attacks for 14 points! Demonic attack inflicts 50 additional damage points! Balrog speed attack inflicts 77 additional damage points! Total damage = 141 The balrog attacks for 57 points! Balrog speed attack inflicts 67 additional damage points! Total damage = 124 The balrog attacks for 27 points! Balrog speed attack inflicts 19 additional damage points! Total damage = 46 The balrog attacks for 23 points! Balrog speed attack inflicts 64 additional damage points! Total damage = 87 The balrog attacks for 64 points! Balrog speed attack inflicts 12 additional damage points! Total damage = 76 The balrog attacks for 70 points! Balrog speed attack inflicts 33 additional damage points! Total damage = 103 The balrog attacks for 17 points! Balrog speed attack inflicts 69 additional damage points! Total damage = 86 The balrog attacks for 79 points! Balrog speed attack inflicts 57 additional damage points! Total damage = 136 The balrog attacks for 54 points! Balrog speed attack inflicts 6 additional damage points! Total damage = 60 The balrog attacks for 66 points! Demonic attack inflicts 50 additional damage points! Balrog speed attack inflicts 74 additional damage points! Total damage = 190 

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 Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions