01 // PROJECT AT A GLANCE
C++ POOL — DAY 09
C++CA role-playing class hierarchy: warrior, mage, paladin, priest, hunter.
Inheritance lets you say that a mage is a character, with everything that implies, plus its own specifics. The support is a classic role-playing game: five character classes share hit points and a name, but each one fights in its own way.
A Character base class and five derived classes (Warrior, Mage, Paladin, Priest, Hunter), with method overriding and parent constructor calls.
PRIMARYC++
DELIVERYTEAM RECORD
VERIFICATIONgcc/g++
SOURCEINSPECTOR READY
03 // KEY OUTCOMES
- Multiple diamond inheritance, resolved through virtual inheritance and using declarations
- Inheritance hand-coded in C before being used in C++
- Initialisation chain and construction order in a multi-level hierarchy
04 // SOURCE TREE
READING SOURCE…