Course Introduction: Object Oriented Programming with C++
C++ is a multi-paradigm, statically-typed, compiled language that adds object-orientation to C. Created by Bjarne Stroustrup at Bell Labs (1979, originally "C with Classes"; renamed C++ in 1983), it powers some of the largest, most performance-sensitive systems in the world — Microsoft Office, Adobe products, Chrome, MySQL, MongoDB, the Unreal/Unity game engines, the LHC's physics simulations, and most high-frequency-trading systems.
This course (IPU BCA) maps to the IPU syllabus and its companion lab paper (C++ Lab). It covers the complete OOP toolkit across four units: language basics + OOP paradigm (Unit I), classes, objects, constructors and destructors (Unit II), inheritance, polymorphism and operator overloading (Unit III), and templates, exception handling, streams and files (Unit IV).
By the end you will be able to design and code real-world systems using inheritance hierarchies, virtual functions, operator overloading, generic templates, exception-safe code, and file I/O.
---
Why OOP Matters
| Aspect | Procedural (C) | Object-Oriented (C++) |
|---|---|---|
| Decomposition | Top-down — functions | Bottom-up — objects |
| Data + behaviour | Separate (struct + funcs) | Encapsulated (class) |
| Reuse | Function libraries | Inheritance + composition |
| Real-world modelling | Indirect | Natural — entities are objects |
| Maintainability | Hard at scale | Modular, localised changes |
| Extensibility | Modify existing functions | Inherit + override |
OOP solves the scalability problem of procedural code: when a system has 100 functions operating on 10 structs, every change ripples everywhere. OOP groups data with the operations that act on it, making changes localised and safe.
---
The Four Pillars of OOP
| Pillar | Definition | C++ Mechanism |
|---|---|---|
| Encapsulation | Bundle data + operations; hide internals | class with private members |
| Abstraction | Show essential features, hide details | Public interface + private implementation |
| Inheritance | Derive new classes from existing ones | class B : public A |
| Polymorphism | Same interface, multiple behaviours | Virtual functions + overloading |
Exam tip: Every OOP question can be answered through these four pillars. Memorise them with one-line definitions and one C++ example each.
---
The Four Units At a Glance
| Unit | Theme | Key Topics | Hours (IPU) |
|---|---|---|---|
| I | OOP Paradigm + C++ basics | OOP concepts, C vs C++, references, functions, new/delete | 10 |
| II | Classes, Objects, Constructors | Class declaration, friend, static, this, constructors, destructors | 11 |
| III | Inheritance, Polymorphism, Operator Overloading | Derivation modes, virtual functions, abstract classes, operator overloading | 12 |
| IV | Templates, Exceptions, Files | Function/class templates, exception handling, streams, file I/O | 11 |
---
Textbooks (IPU Prescribed)
- TB1. K.R. Venugopal, Rajkumar, T. Ravishanker, Mastering C++, TMH
- TB2. E. Balagurusamy, Object Oriented Programming with C++, McGraw-Hill — the IPU classic
- RB1. Ashok N. Kamthane, Object-Oriented Programming with ANSI and Turbo C++, Pearson
- RB2. Herbert Schildt, C++: The Complete Reference, Tata McGraw Hill
- RB3. Robert Lafore, Object Oriented Programming using C++, Galgotia Publications
---
Modern C++ Note
The IPU syllabus is largely C++98 + a touch of C++03 style. Real-world C++ has evolved significantly:
- C++11 (2011) — auto, lambdas, smart pointers, move semantics, range-based for,
nullptr - C++14 (2014) — refinements
- C++17 (2017) —
std::optional, structured bindings,if constexpr - C++20 (2020) — concepts, ranges, coroutines, modules
- C++23 (2023) —
std::expected, more refinements
For exams, stick to the textbook style — but where this course shows alternative modern idioms (e.g. unique_ptr instead of raw new/delete), they are flagged as "modern note."
---
How to Get the Most From This Course
- Write the code yourself. OOP is not a spectator sport — type every example into the online compiler and run it.
- Memorise the pillars first. Encapsulation, abstraction, inheritance, polymorphism — these four words structure every answer.
- Master the "this" pointer, virtual functions, and templates. These three concepts separate the top scorers from the rest.
- Draw diagrams for inheritance hierarchies. Examiner expects you to show class trees.
- Match topics to PYQ patterns — operator overloading + virtual functions + constructors are the three highest-frequency 12.5-mark questions.
Let's begin.