Welcome to my Object-Oriented Programming repository!
A personal learning journal and code repository tracing my journey into Object-Oriented Programming through first-principles thinking.
This repository is not a tutorial. It is not a course. It is a documented learning experience.
Every file here was written while working through Object-Oriented Programming (OOP) in Python from the ground up β starting with the 'why' before the 'how'. The code, structure, and comments reflect genuine learning in real time: the confusion, the clarity, the breakthroughs, and the gradual building of intuition.
If you are a beginner trying to understand OOP not just syntactically but conceptually, this repository might be the companion you were looking for.
- Understand why OOP exists before learning what it looks like
- Build each concept from scratch β no magic, no shortcuts
- Write code that explains itself β through naming and structure
- Track the mental model as it evolves, from procedural thinking to object-oriented thinking
- Create a reference I (and others) can return to at any stage
The repository is organised sequentially into dedicated modules, each focusing on a fundamental pillar of OOP:
Object-Oriented Programming(OOP)/
β
βββ 01Python Classes and Objects/
β βββ understanding_OOP.md # What life looks like before objects
| βββ Dog_practice.py # Creating objects, class attributes, methods(functions that belong to a class), constructor methods(`__init__`)
β
βββ 02Encapsulation/
β βββ understanding_Encapsulation.md # What encapsulation looks like using ATM system as analogy
β βββ BankAccount_practice.py # How Python enforces privacy, getter/setter method
β
βββ 03Inheritance/
β βββ understanding_Inheritance.md # Interpretation with common traits of animals
β βββ Animal_practice.py # Buliding a parent class,Extending and specialising through child classes, super keyword
β
βββ 04Polymorphism/
β βββ understanding_Polymorphism.md # Same name, different behaviours
β βββ Animal_example.py # Making objects play nice with operators
β βββ Notification_system.py # Another example for comprehension
β
βββ 05Abstraction/
β βββ understanding_Abstraction.md # Internal complexity, differences between Encapsulation and Abstraction
β βββ PaymentSystem.py # How Python approximates interfaces using ABC module
β
βββ 06Real_World_projects/
β βββ All_4_Pillars_example.py # A mini project using all four pillars
β βββ Library_System.py # A mini project using all four pillars
β
βββ notes/
β βββ glossary.md # OOP terms in plain language
β
βββ .gitignore
β
βββ LICENSE # MIT LICENSE
β
βββ README.md
| Pillar | What It Means | Where It Lives |
|---|---|---|
| Encapsulation | Bundling data and behaviour together; hiding what shouldn't be exposed | 02Encapsulation/ |
| Inheritance | Building new classes on top of existing ones | 03Inheritance/ |
| Polymorphism | Different objects responding to the same instruction differently | 04Polymorphism/ |
| Abstraction | Hiding complexity behind a clean, simple interface | 05Abstraction/ |
If you are exploring this as a learning resource, follow this sequence:
01 β 02 β 03 β 04 β 05 β 06
Each folder builds on the previous. The notes/ directory can be read at any point β especially glossary.md when a term is not understood clearly.
First principles thinking means refusing to accept "just memorise this syntax" as a sufficient answer.
For every concept in this project, the question asked first was:
"What problem does this solve, and why was it designed this way?"
For example β before learning what a class is, the question was: what happens when you don't have classes? The answer to that question (see 01Python Classes and Objects/) makes everything that comes after feel inevitable rather than arbitrary.
This approach takes longer. It is worth it.
- Python 3.10+ installed
- A code editor (VS Code, PyCharm, or any IDE of your choice)
- Curiosity β no prior OOP knowledge required
# Clone the repository
git clone https://github.com/IntentionedReflex35/Object-Oriented-Programming-OOP-.git
# Navigate into the project
cd Object-Oriented Programming(OOP)
# Run any file directly
python 01Python Classes and Objects/Dog_practice.pyNo external dependencies. No requirements.txt. Pure Python, pure learning.
The code in this repository is intentionally and mostly verbose and over-commented. This is not sloppy practice β it is deliberate pedagogy.
- Variable names are descriptive, sometimes even long, to make intent obvious
- Comments explain why a decision was made, not just what the line does
- Most files are self-contained and can be read independently
This project was born from a personalised learning session conducted inside an IDE. Concepts were explored interactively β questions asked, code written live, misconceptions corrected in real time β and then the outputs were organised into this structured repository.
The value is not just in the code. It is in the shape of the learning β how the understanding was built, layer by layer, from first principles.
Once you have worked through this project, the following resources pair well with the foundations built here:
- Python Official Docs β Classes
- Fluent Python by Luciano Ramalho β for when you are ready to go deep
- Clean Code by Robert C. Martin β for writing OOP that others can maintain
- Real Python β OOP in Python 3
This project is open source under the MIT License. Use it, fork it, learn from it, share it.
This repository represents a personal milestone β the point where Python stopped being a scripting tool and started becoming a language for building systems. It is shared publicly in the hope that someone else at the same starting point finds it useful.
"The best way to learn is to build. The best way to remember is to explain."
Jeshurun Nana Kojo Ansah β Geomatic Engineering student | Aspiring Data Analyst
π GitHub: IntentionedReflex35
"Move stealthy, execute in silence."