Semester 2: The Logic Foundation > This repository documents my transition from procedural programming to Object-Oriented design. It serves as a structured record of the core OOP principles I mastered during my second semester.
I organized this roadmap to move from basic class structures to complex concepts like dynamic binding and architectural design patterns. Each module contains documented source code and practical implementations.
| No. | Topic | Core Focus | Source Code |
|---|---|---|---|
| 01 | Introduction | Classes, Objects, and Data Members | View Code |
| 02 | Constructors | Overloading & Copy Constructors | View Code |
| 03 | Destructors | Object Lifecycle & Memory Cleanup | View Code |
| 04 | Operator Overloading | Customizing Operator Behavior | View Code |
| 05 | Inheritance | Access Specifiers & Derived Classes | View Code |
| 06 | Function Overriding | Polymorphism in Derived Classes | View Code |
| 07 | Inheritance Types | Multilevel & Multiple Inheritance | View Code |
| 08 | Polymorphism | Compile-time vs Run-time logic | View Code |
| 09 | Object Pointers | Managing Objects via Memory Addresses | View Code |
| 11 | Virtual Functions | Dynamic Binding & Polymorphism | View Code |
| 13 | Pure Virtual Functions | Abstract Classes & Interfaces | View Code |
| 14 | Virtual Base Classes | Solving the Diamond Problem | View Code |
- Language: C++
- Concepts: Encapsulation, Inheritance, Polymorphism, Abstraction.
- Tools: VS Code, G++ Compiler.
OOP_cpp/
├── 01_introduction/
│ ├── 01_data_member_and_data_function/
│ ├── 02_defining_member_function_outside_class/
│ └── 03_user_defined_data_type/
├── 02_constructor/
│ ├── 01_constructor_introduction/
│ ├── 02_constructor_overloading/
│ ├── 03_default_copy_constructor/
│ └── 04_passing_parameters_to_constructor/
├── 03_destructor/
├── 04_operator_overloading/
├── 05_inheritence/
│ ├── 01_accessing_members_of_parent_class/
│ └── 02_specifying_a_dervied_class/
├── 06_function_overriding/
├── 07_Types_of_inheritence/
│ ├── 01_multilevel_inheritence/
│ └── 02_multiple_inheritence/
│ └── 01_contructors_in_multiple_inheritence/
├── 08_polymorphism/
├── 09_pointer_to_objects/
├── 10_pointers_and_inheritance/
├── 11_virtual_functions/
├── 12_early_and_late_binding/
├── 13_pure_virtual_function/
└── 14_virtual_base_classes/
LICENSE
README.md
CONTRIBUTING.md
CODE_OF_CONDUCT.md
.gitignore
-
Clone or Download the repository:
git clone https://github.com/sehrishjaved19/oop-cpp.git
-
Open in VS Code or any C++ IDE.
-
Navigate to the desired section (e.g.,
01_introduction/). -
Compile and run each
.cppfile using g++:g++ filename.cpp -o output ./output
-
Practice with exercises provided in the subfolders.
- C++ Compiler (GCC, MinGW, or equivalent)
- A text editor or IDE (VS Code)
- Basic command-line knowledge
This repository is licensed under the MIT License — see the LICENSE file for details.
Author: Sehrish Javed
GitHub: @sehrishjaved19
LinkedIn: Sehrish Javed
Twitter (X): @Sehrishjaved119