About 1902 letters
About 10 minutes
Object-Oriented Programming (OOP) is a very popular programming paradigm that organizes code around objects as the fundamental units.
For example, consider the question: "How do you put an elephant into a refrigerator?" A straightforward procedure would be:
In procedural programming, this can be represented as:
open_door(refrigerator) store(refrigerator, elephant) close_door(refrigerator)
This approach is called Procedure-Oriented Programming (POP), where the basic unit is the procedure.
Using the object-oriented mindset, the problem is decomposed into interacting objects: a “refrigerator” object and an “elephant” object. The refrigerator can perform operations such as opening the door, closing the door, storing items, and retrieving items.
The flow in OOP still follows a process:
refrigerator.open_door() refrigerator.store(elephant) refrigerator.close_door()
But the code modules are organized around related responsibilities — for example, refrigerator.open_door()
only handles the refrigerator door, not some other door like a TV door.
Summary:
Reference: Object-oriented programming - Wikipedia
Created in 5/15/2025
Updated in 5/15/2025