PROJECT DOSSIER // [C++ POOL — DAY 13]VIEW SOURCEBACK TO PROJECTS →

01 // PROJECT AT A GLANCE

C++ POOL — DAY 13

C++

A heterogeneous collection of toys handled through a single interface.

The theme is Toy Story: toys of different types — Buzz, Woody — that you want to store in the same box and treat the same way, even though each behaves in its own manner. This is the heart of object-oriented programming: writing code that works with types that do not exist yet.

A complete progression over the same Toy / Picture pair of classes: encapsulation, canonical form, inheritance (Buzz, Woody), virtual methods, double overloading of the << operator, and an Error class nested inside Toy for error reporting.

PRIMARYC++
DELIVERYTEAM RECORD
VERIFICATIONgcc/g++
SOURCEINSPECTOR READY
MEDIA ATTACHMENTS (Images, Photos, Videos)

03 // KEY OUTCOMES

  • The same code revisited six times, from encapsulation to the nested class
  • Two overloads of the same << operator with completely different meanings

04 // SOURCE TREE

READING SOURCE…