This repository contains solutions to Object-Oriented Programming (OOP) problem sheets assigned during my coursework at the Faculty of Science, Ain Shams University.
It serves as a collection of well-documented examples, exercises, and solutions that demonstrate key OOP concepts in C++.
- Organized Sheets: Each problem sheet is placed in its respective folder for easy navigation.
- Detailed Explanations: Solutions include comments to explain the logic behind the implementation.
- Practical Examples: Includes real-world applications of OOP concepts like encapsulation, inheritance, and polymorphism.
OOP-Sheets
│
├── basics # Classes, Objects, and Methods
│ ├── sheet1
│ ├── sheet2
│ └── sheet3
│
├── midlevel # encapsulation and operators
│ ├── sheet4
│ ├── sheet5
│ └── sheet6
│
├── advanced # Inheritance and polymorphism and template
│ ├── sheet7
│ ├── sheet8
│ └── sheet9
│
└── README.md # Main repository README file
- OOP Basics:
- Classes and Objects
- Data Members and Member Functions
- Function Overloading
- Operator Overloading
- Inheritance:
- Single and Multiple Inheritance
- Access Modifiers
- Polymorphism:
- Abstraction classes
- methods overriding
- Virtual Functions
- Templates:
- Class Templates
To compile and run any of the .cpp
files:
-
Clone this repository:
git clone https://github.com/samir176520/oop-sheets.git cd oop-sheets
-
Navigate to the folder containing the desired sheet and file.
-
Compile the code using a C++ compiler (e.g.,
g++
):g++ Problem1.cpp -o Problem1 ./Problem1
Contributions are welcome! If you'd like to improve solutions or add new examples, follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add detailed explanation for Problem X"
- Push to your fork and create a pull request.
This repository is for educational purposes. Feel free to use and modify the content for personal or academic use.