Beginner Projects
Prerequisites: Level 1 — Beginner
Build these using classes, references, and inheritance from Level 1.
1. Bank Account Class
Model a BankAccount class (private balance, public deposit/
withdraw that reject invalid amounts). Add a SavingsAccount subclass
that overrides a virtual applyInterest() method.
2. Shape Hierarchy
Build an abstract Shape base class with a pure virtual area(), and
Circle/Rectangle/Triangle subclasses. Store a
std::vector<Shape *> (or, better, std::vector<std::unique_ptr<Shape>>
once you've read Level 2's Smart Pointers lesson) and print each one's
area polymorphically.
3. Temperature Converter with Classes
Wrap the Level 1 C temperature-converter logic in a small
Temperature class with a constructor, toFahrenheit()/toCelsius()
methods, and an overloaded operator<< for printing.
4. Simple Inventory System
Model a Product class (name, price, quantity) and an Inventory class
holding a collection of them. Support adding stock, removing stock, and
printing a formatted report.