01 // PROJECT AT A GLANCE
C++ POOL — DAY 10
C++Giving meaning to operators on your own objects, and laying down the first abstractions.
Two powerful ideas in one day. First, you can define what « adding » or « printing » an object you created yourself means. Second, you can describe a category of objects without providing any implementation — a weapon, an enemy — and let each concrete case fill in the blanks.
Operator overloading (including the output stream) then abstract classes with pure virtual methods, over a universe of weapons and enemies.
PRIMARYC++
DELIVERYTEAM RECORD
VERIFICATIONgcc/g++
SOURCEINSPECTOR READY
03 // KEY OUTCOMES
- A first real polymorphism: adding a weapon without touching existing code
- The necessity of the virtual destructor demonstrated by example
04 // SOURCE TREE
READING SOURCE…