Computer ScienceProgrammingMedium

Object-Oriented Programming

Also known as:OOPobject-based programming

Object-Oriented Programming (OOP) is a programming paradigm that organises software design around data, called objects, rather than functions and logic. Each object encapsulates data (attributes) and behaviour (methods), and objects interact with one another to build complex systems. The four core principles of OOP — encapsulation, inheritance, polymorphism, and abstraction — promote code reusability, modularity, and maintainability.

Four Pillars of Object-Oriented Programming

PillarDescriptionKey BenefitExample
EncapsulationBundling data and methods in a classData hiding and securityPrivate bank account balance
InheritanceA class derives properties from a parent classCode reuseDog extends Animal
PolymorphismSame method name, different behavioursFlexibilitydraw() for Circle and Square
AbstractionHiding implementation detailsSimplicityUsing a car without knowing the engine

Interactive Tools

Codecademy – Learn OOP

Open Tool

Khan Academy – Object-Oriented Design

Open Tool

Brilliant – Object-Oriented Programming

Open Tool
Diagram illustrating the four pillars of object-oriented programming

Wikimedia Commons, CC BY-SA

Related Terms

The term "object-oriented" was coined by Alan Kay in the early 1960s while developing Simula and later Smalltalk at Xerox PARC. "Object" derives from Latin "objectum" (thing thrown before the mind); the paradigm was popularised through C++ (1983) and Java (1995).

oopparadigmclassesobjectssoftware-design