In Week 9, I dived deep into Object-Oriented Programming in C++ with a special focus on inheritance and overloading. This week was all about implementing concepts like multiple, multi-level, hierarchical, and hybrid inheritance, alongside constructor and function overloading to build real-life simulations and utility-based mini apps.
🔹 Day 57 – Virtual Functions & Eligibility Checks
- Calories Burned Calculator – Polymorphism with virtual functions
- Rent Eligibility Checker – Calculates rent based on income percentage
- Library Fine System – Computes fines using inheritance and date logic
🔹 Day 58 – Multiple Inheritance in Action
- Electricity Bill Calculator – Based on unit usage and connection type
- GDP per Capita – Divides GDP by population
- Health Assessment – Combines BMI and blood pressure metrics
🔹 Day 59 – Multi-level Inheritance Utilities
- Car Parameter Calculator – Calculates range, payload, and weight
- Fuel vs Electric Comparison – Estimates range of different car types
- Travel Budget Planner – Solo trip expense planner
🔹 Day 60 – Hierarchical & Simple Applications
- Simple Banking System – Deposit, withdrawal, and interest
- Plant Discount System – Ratings and discount logic
- Language Stats – English and Spanish speaker majority calculation
🔹 Day 61 – Hybrid Inheritance Systems
- Student Record System – UG/PG grading & evaluation
- Weather Monitor – Checks weather from temp & humidity
- Vehicle Rental Calculator – Costs based on mileage and type
🔹 Day 62 – Constructor Overloading in Practice
- Odd/Even Sum Calculator – Constructor logic based on user input
- Distance Converter – Miles ↔ Km with validation
- Speed Calculator – Overloaded constructor for time format flexibility
🔹 Day 63 – Function Overloading for Flexibility
- Minimum Finder – Overloaded function for int/double
- Millimetre Converter – Converts mm → cm/km based on input
- Shopping Cart Total – Calculates total with/without discount
🏁 Key Highlights
- Implemented every major inheritance type in practical projects
- Applied constructor & function overloading for reusability and abstraction
- Built 20+ projects simulating real-world scenarios using OOP
🔍 Looking Ahead
As I move into Week 10, the focus will shift toward integrating OOP concepts into more structured systems and starting small project-based builds. The goal is to get closer to real-world app architecture.
📌 Stay tuned and follow my journey on GitHub for all code updates!
💬 What’s your favorite way to apply inheritance in your own projects?