< Previous | Contents | Next >

Exercises

1. Improve the Simple Boss 2.0 program by adding a new class, FinalBoss, that is derived from the Boss class. The FinalBoss class should define a new method, MegaAttack(), that inflicts 10 times the amount of damage as the SpecialAttack() method does.

2. Improve the Blackjack game program by forcing the deck to repopulate before a round if the number of cards is running low.

3. Improve the Abstract Creature program by adding a new class, OrcBoss, that is derived from Orc. An OrcBoss object should start off with 180 for its health data member. You should also override the virtual Greet() member function so that it displays: The orc boss growls hello.



appendix A


image