Final Project
Alright, this is the big one — the capstone project. Everything you've learned over the past 18 weeks? It all comes together right here. You're going to build a complete Shape Management System from scratch: a real C++ application that creates, stores, manipulates, and displays geometric shapes. And the cool part is that this one project touches basically every major concept from the entire course.
Let me show you what I mean — check out how each thing you've learned maps directly to a piece of this project:
| Course Concept | How It Appears in the Project |
|---|---|
| Inheritance | Circle, Rectangle, and Triangle all derive from the abstract Shape base class |
| Polymorphism | A Shape** array holds different shape types; calling area() on each runs the correct derived version |
| Virtual Functions | area(), perimeter(), display(), and clone() are all pure virtual in Shape |
| Dynamic Memory | ShapeCollection manages a dynamic array of Shape* pointers allocated with new |
| Rule of Three | ShapeCollection implements destructor, copy constructor, and copy assignment operator |
| Operator Overloading | == compares shapes by area, < sorts by area, << prints shape info, [] accesses by index |
| Const Correctness | const on methods that do not modify state, const& parameters for efficiency |
| Static Members | Shape::totalShapes tracks how many shapes exist across the entire program |
| Multi-file Organization | Each class lives in its own .h/.cpp pair with include guards |
The clone() Pattern | Enables deep copying of derived objects through base class pointers |
Don't let the size of this project intimidate you. The trick is to take it one step at a time — get one small piece working, test it, then move on to the next. And if you get stuck on something, flip back to the earlier weeks for a refresher. You've already learned all of this stuff individually; now you're just putting the puzzle pieces together.