Skip to content

IntentionedReflex35/Object-Oriented-Programming-OOP-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

35 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Object-Oriented Programming (OOP) in Python β€” First Principles

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.


πŸ“– What This Project Is

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.


🎯 Goals of This Project

  • 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

πŸ“ Repository Structure

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                   

🧱 The Four Pillars β€” A Beginner's Summary

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/

🧭 Learning Path (Recommended Reading Order)

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 Approach β€” What Does That Mean Here?

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.


πŸ”§ Prerequisites

  • 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.py

No external dependencies. No requirements.txt. Pure Python, pure learning.


πŸ—’οΈ Code Style & Conventions

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

🀝 How This Was Made

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.


πŸ“š Further Reading

Once you have worked through this project, the following resources pair well with the foundations built here:


πŸ“„ License

This project is open source under the MIT License. Use it, fork it, learn from it, share it.


πŸ™‹ About

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."


πŸ‘¨πŸΏβ€πŸŽ“ Author

Jeshurun Nana Kojo Ansah β€” Geomatic Engineering student | Aspiring Data Analyst
πŸ”— GitHub: IntentionedReflex35

"Move stealthy, execute in silence."


Built with curiosity. Documented with honesty. Shared with purpose.

Python License Last commit Stars Approach Level

About

πŸš€ Practical implementation and exercises covering the core pillars of Object-Oriented Programming(OOP) in Python.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages