Run-time polymorphism lets related classes share an interface while each derived type supplies its own operation. A Shape can expose area while Circle provides the type-specific computation. section 8.9
The mistake is calling virtual functions from constructors or destructors. A Person, Student, and GradStudent hierarchy prints progressively more specific honorifics during construction, producing “Aimee,” “second year Aimee,” and “candidate Aimee” rather than one final dynamic result. Keep construction free of virtual calls; let the fully constructed object use polymorphic behavior afterward. section 8.9
