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
│
├── sheet1
│ ├── homework.cpp # Review on all lecture contant
│ ├── problem1.cpp # Review in basics of cpp
│ ├── problem2.cpp # Functions
│ ├── problem3.cpp # Functions And arrays
│ └── sheet #1.pdf
├── sheet2
│ ├── homework1.cpp # Review on everything related to structure
│ ├── homework2.cpp # Review on everything related to Class
│ ├── problem1.cpp # Structure, call by reffrence and value
│ ├── problem2.cpp # Structure, functions
│ ├── problem3.cpp # Class , Methods
│ ├── problem4.cpp # integrity between Classes and Structure
│ └── sheet #2.pdf
├── sheet3
│ ├── homework.cpp # Review on all lecture contant
│ ├── problem1.cpp # Class, construcor, static vairables
│ ├── problem2.cpp # Class, construcor, static vairables,recursive, friend functions
│ ├── problem3.cpp # integraty beyween classes, friend functions
│ └── sheet #3.pdf
├── sheet4
│ ├── homework.cpp # Review on all lecture contant
│ ├── problem1.cpp # operator overloding, friend operator overloading functions
│ ├── problem2.cpp # operator overloding, friend operator overloading functions
│ └── sheet #4.pdf
├── sheet5
│ ├── data.h # Header-file for problem1.cpp
│ ├── mark.h # Header-file for problem2.cpp
│ ├── problem1.cpp # post-fix, pre-fix, more operator overloading{iostream}, handle header files
│ ├── problem2.cpp # post-fix, pre-fix, more operator overloading{iostream}, handle header files
│ └── sheet #5.pdf
├── sheet6
│ ├── problem1.cpp # Composition (Containership), operator overloading{iostream}, friend funcions
│ ├── problem2.cpp # Single Inheritance, friend functions
│ ├── problem3.cpp # Multiple Inheritance
│ ├── problem3.cpp
│ └── sheet #6.pdf
├── sheet7
│ ├── problem1.cpp # Multilevel Inheritance, override functions
│ ├── problem2.cpp # Diamond-shaped inheritance (Hybrid Inheritance), override functions
│ └── sheet #7.pdf
├── sheet8
│ ├── problem1.cpp # Single inhertince, polymorphism, virtual functions, override
│ └── sheet #8.pdf
├── sheet9
│ ├── problem1.cpp # polymorphism, inhertince, Virtual functions, abstract class
│ ├── problem2.cpp # templete class
│ └── sheet #9.pdf
│
└── README.md # Main repository README file
├── basics # struct, Classes, Objects, and Methods
│ ├── sheet1
│ ├── sheet2
│ └── sheet3
│
├── midlevel # encapsulation and operators
│ ├── sheet4
│ ├── sheet5
│ └── sheet6
│
└── advanced # Inheritance and polymorphism and template
├── sheet7
├── sheet8
└── sheet9
- 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.