Level 1
1 day < 1 min
LeaderboardGuest · Log in
Key point 4 of 8 · Programming Fundamentals
Estimated reading time: 5 min

Programming Paradigms

Object-oriented programming organizes a program around objects, self-contained units that bundle together data and the functions, usually called methods in this context, that operate on that data. A class serves as the blueprint, or template, from which objects are created: it defines what data (commonly called attributes or fields) and what behavior (its methods) every object built from that class will have, without itself being a concrete object. An object, sometimes called an instance, is a specific realization of a class, created, or 'instantiated,' from that blueprint, with its own particular values stored in the attributes the class defines; a single class such as 'Car' might be used to create many distinct car objects, each with its own color, mileage, and fuel level, while all sharing the same set of methods, such as accelerate or brake, defined once on the class. This model mirrors how many people naturally think about the entities a program deals with, as things with both properties and capabilities, which is part of why object-oriented programming became, and largely remains, one of the dominant approaches to structuring larger software systems.

Food for thought

Why do you think there's historiographical debate about "Programming Paradigms"?