In Week 10, I wrapped up the 100 Days of Code milestone with advanced Object-Oriented Programming concepts in C++. This week was all about operator overloading, function templates, virtual functions, and even class templates—all applied in real-world use cases like billing systems, calculators, and booking apps.
🔹 Day 64 – Operator Overloading with Real-Life Classes
-
Fraction Adder – Adds two fractions using overloaded
+
operator -
Velocity Calculator – Overloads
*
to compute final velocity usingv = u + at
-
Weight Tracker – Increments student weight with
++
using friend function
🔹 Day 65 – Inheritance & Virtual Functions in Practice
- Item Billing System – Calculates total with discounts using base & derived classes
- Sleep Tracker – Compares weekday vs weekend sleep duration
- Student Grade System – UG and PG grade evaluation with polymorphism
🔹 Day 66 – More Virtual Function Use-Cases
-
Power Evaluator – Calculates
a^b
andb^a
using pure virtual functions - Hotel Room Billing – Calculates cost for single/double rooms with rules
- Transport Time Calculator – Computes time based on travel modes and locations
🔹 Day 67 – Applying Inheritance in Utility Tools
- Arithmetic Operator Class – Virtual functions for add, subtract, multiply, divide
- Electricity Bill by Appliance – Calculates energy usage across devices
- Alphabet Game Scorer – Adds/subtracts score for upper/lowercase letters
🔹 Day 68 – C++ Templates in Action
- Value Swapper – Swaps float and double using class templates
- Bank Interest Calculator – Template class for computing yearly interest
- Derived Class Template Swap – Uses derived class to swap values with formatting
🔹 Day 69 – STL-Based Challenges
- Inventory Merger – Merges and sorts two batches of item IDs
- List Cleaner – Removes all instances of a target number
- Unique Sum Calculator – Computes sum of unique integers with size constraint
🔹 Day 70 – Structs, Templates & Booking Systems
- Compatibility Checker – Compares age, height, and education using structs
- Booking Revenue Calculator – Uses function templates to calculate revenue
- Audi Test Drive Slot System – Checks and books available test drive dates
🏁 Key Highlights
✅ Explored operator overloading for intuitive operations
✅ Applied class and function templates for generic coding
✅ Used inheritance and virtual functions in over 20+ practical projects
✅ Hit the 100 Days of Code milestone with consistent learning and building
🔍 Looking Ahead
Moving forward, I’ll focus on building structured C++ projects that combine all the concepts learned—templates, inheritance, polymorphism, and file handling. Excited to begin architecting mini real-world systems!
📌 Catch the full journey and codebase on GitHub
💬 What’s your favorite way to apply templates in real-world projects?