Combining state and behavior
An object combines state with operations that inspect or change it. A software account, for example, can keep a balance and provide deposit and withdrawal methods that enforce shared rules. Objects may also represent parsers, connections, or tasks; they need not correspond to tangible things in the physical world.
Maintaining rules through an interface
Encapsulation directs interaction through an interface rather than through every detail of an object’s representation. A method can validate changes before applying them. Merely placing fields beside functions is insufficient: if callers can bypass the intended rules, grouping code into an object has not by itself protected its invariants.
References: [1]
Classes and inherited behavior
In class-based systems, a class describes behavior shared by its instances. A derived class can inherit operations, override methods, or add capabilities. Python supports multiple base classes, while other languages impose different inheritance and visibility rules. One language’s class mechanism is therefore an example rather than the universal definition of object orientation.
References: [2]
Dispatching the same operation
Objects supporting a common operation can select different implementations when called. A drawing request can be handled by a circle or rectangle without duplicating each shape’s details at the call site. Inheritance is one reuse mechanism; composition and explicit interfaces can also organize cooperation without an ever-growing hierarchy of subclasses.