Back to Computer Fundamentals And Programming repository
Computer Fundamentals And Programming2D

Object-Oriented Programming (OOP) - Theory & Concepts - Object Oriented Programming

An advanced introduction to Object-Oriented Programming principles including the four pillars, abstract classes, interfaces, UML diagrams, and SOLID principles.

Open the complete lesson

The Class (Blueprint)class Car

class Car {
Attributes (State)
color;
model;
speed;
Methods (Behavior)
start() { ... }
accelerate() { ... }
brake() { ... }
}

A class defines the properties and behaviors that all objects of this type will have.

Objects (Instances)

Instance of Car
color:
"Red"
model:
"Sports"
speed:
"120 mph"