Conceptly

Understand Object-Oriented Programming visually

Explore each concept's architecture through animated diagrams. Click a card to dive deeper.

๐Ÿ“Blueprint๐ŸงฑClass๐Ÿ“ฆObjects
๐Ÿงฑ

Class

The basic design unit for objects

A class is the blueprint that declares the state slots and methods an object should have. Even when many objects exist at runtime, the class is what defines the structure and behavior they share.

๐ŸงฑClass๐Ÿ“ฆObjectโš™๏ธState + Behavior
๐Ÿ“ฆ

Object

A concrete runtime instance

An object is the runtime instance created from a class. Even when two objects come from the same class, each can hold different state, and that state can change the result of the same method call.

๐Ÿ“ฅArguments๐Ÿ—๏ธConstructor๐Ÿ“ฆReady Object
๐Ÿ—๏ธ

Constructor

The routine that establishes initial object state

A constructor is the routine that runs when an object is being created and brings it into a usable starting state. It gathers the rules for which values are required and which invariants must hold from the very beginning.

๐Ÿ—‚๏ธInternal State๐Ÿ”’Encapsulation๐ŸšชPublic Methods
๐Ÿ”’

Encapsulation

Protecting state behind controlled methods

Encapsulation is the principle of not exposing an object's internal state directly and instead forcing access through approved methods. The goal is not hiding for its own sake, but keeping the rules for state changes inside the object that owns them.

๐ŸงฉComplex Details๐ŸŽฏAbstraction๐Ÿ“‹Simple Model
๐ŸŽฏ

Abstraction

Modeling that keeps only the essential surface

Abstraction is the act of keeping the important properties of a problem and pushing distracting detail into the background. In object-oriented design, abstraction is less about simplification in the abstract and more about deciding which conceptual surface the rest of the system should see.

๐Ÿ‘คClient๐Ÿ”ŒInterface๐ŸงฑImplementations
๐Ÿ”Œ

Interface

A contract that promises behavior without implementation

An interface is a contract that declares which operations must exist while leaving the implementation of those operations to concrete types. Callers can depend on the contract rather than on one class name and its internals.

๐Ÿ“šShared Base๐ŸชœAbstract Class๐ŸŒฟSubclasses
๐Ÿชœ

Abstract Class

A base class with shared behavior and extension points

An abstract class is a base class that provides some shared implementation while still leaving some required behavior for subclasses to supply. Unlike an interface, it can carry reusable code and common state along with the contract.

๐ŸงฑBase Class๐ŸŒณInheritance๐ŸŒฟSubclass
๐ŸŒณ

Inheritance

A relationship that extends one type from another

Inheritance is the relationship where a new class is built on top of an existing class. The child class receives fields and methods from the parent and can add to them or override parts of them to become more specific.

๐Ÿ“ฆObject A๐Ÿ”—Association๐Ÿ“ฆObject B
๐Ÿ”—

Association

A link that expresses references between objects

Association means that one object knows about or references another object. In object-oriented modeling, it is the most basic way to describe not only isolated objects but also the relationship graph between them.

๐Ÿ Whole๐Ÿงฉhas-a๐Ÿ”งParts
๐Ÿงฉ

Composition

Building larger objects by combining smaller ones

Composition is the design style where one object owns or holds other objects as parts and delegates work to them to form the larger behavior. The important shift is that reuse happens through collaboration rather than through parent-child hierarchy.

๐Ÿ“คSenderโœ‰๏ธMessage๐Ÿ“ฅReceiver
โœ‰๏ธ

Message Passing

How objects cooperate through method calls

Message passing is the idea that objects cooperate by sending requests to one another through method calls instead of reaching into each other's internals. The sender states what it wants; the receiver decides how to fulfill that request using its own state and implementation.

๐Ÿ‘คClient๐ŸŽญSame Messageโš™๏ธDifferent Behavior
๐ŸŽญ

Polymorphism

The property that the same call can behave differently by type

Polymorphism is the property that callers can interact through one interface or base type while the actual behavior depends on the concrete runtime type. The caller does not need to know the class name to keep the collaboration working.