Object-oriented programming, the way I actually use it
20 June 2025 · 5 min read · By Khushi Bansal, Chitkara University
Object-oriented programming finally made sense to me when I stopped reading definitions and started building. The four pillars are easier in plain language.
Encapsulation is keeping data and the code that changes it together. Inheritance is sharing common behaviour without repeating yourself. Polymorphism is letting different types respond to the same call. Abstraction is hiding detail behind a simple interface.
In my projects I lean on OOP to keep things tidy: a clear class for a user, another for a job posting, each owning its own rules. The beginner mistake I made was creating classes for everything; now I only reach for them when they earn their place.
OOP is a tool, not a religion. Use it where it makes the code clearer, and keep things simple where it does not.
Written by Khushi Bansal, a final-year Computer Science student at Chitkara University and the founder of Elegant Threads & Beads.