Demonstrates runtime polymorphism with a Shape base class and concrete Circle, Square, and Quad types.
| Class/File | Highlights |
|---|---|
Shape |
Pure‑virtual area() / perimeter() |
Circle |
Stores center, radius |
Square |
Stores origin and side length |
Quad |
Four‑point arbitrary quadrilateral |
allShapes |
Factory & polymorphic collection demo |
MainTrain |
Unit‑test‑style harness |
- Add new shapes by inheriting
Shapeand overriding its virtual methods. - Replace raw pointers with smart pointers for automatic memory handling.
MIT