Object Oriented Programming using C++ Notes
Subject Overview
This paper builds object-oriented programming skills in C++ — program fundamentals and control structures, arrays/
Read moreShow less
A 4-credit core theory paper.
Subject at a glance
4
Units
32
Topics
4
Credits
4
Infographics
Unit-wise Syllabus
4 units — open any unit for detailed topic-wise notes, diagrams and important exam questions
- OOP introduction and basic features
- C++ program structure
- compiling and executing programs
- procedural vs object-oriented languages
- I/O and assignment statements
- constants
- variables
- operators
- data types
- control structures (if-else, nested if, while, do-while, for, jump statements)
Study guide
This unit covers the OOP approach, C++ program structure, compiling and running, procedural versus OO languages, I/O, constants, variables, operators, data types and control structures. Write and run programs as you read.
- Array declaration
- single and multi-dimensional arrays
- memory representation
- matrices
- strings and string handling functions
- structures and unions
Study guide
You study arrays (single and multi-dimensional), memory representation, matrices, strings and string functions, structures and unions. Practise matrix and string programs.
- Class and function definitions
- scope resolution operator
- private/protected/public members
- nesting of member functions
- object creation and access
- parameterized and copy constructors
- multiple constructors
- dynamic initialization
- destructors
Study guide
You study classes, member functions, scope resolution, access specifiers, nesting, objects, constructors (parameterised, copy, multiple), dynamic initialisation and destructors. Model a real entity as a class.
- Constructors/destructors under inheritance
- single/multiple/multilevel/hierarchical/hybrid inheritance
- function/unary/binary operator overloading
- binding
- friend and virtual functions
- file opening/closing
- file modes and methods
Study guide
You study constructors under inheritance, the five inheritance types, function and operator overloading, binding, friend and virtual functions and file handling. Understand when virtual functions are needed.
Why Object Oriented Programming using C++ Matters
OOP in C++ builds design discipline that carries over to Java and Python and is a staple of interviews.
How to Prepare for Object Oriented Programming using C++
- Code every OOP concept in a small program.
- Learn the difference between overloading and overriding.
- Draw class diagrams before coding.
Object Oriented Programming using C++: Frequently Asked Questions
What is polymorphism?
Polymorphism allows the same function name or operator to behave differently depending on context, through overloading or virtual functions.
