All Roadmaps

Object Oriented Programming Roadmap

Master OOP concepts from basics to advanced design patterns — with language-specific implementations in Java, Python, C++, and JavaScript.

4-6 weeks25 topics across 6 stages
JavaPythonC++JavaScript

Prerequisites

  • Basic computer skills
  • A text editor installed
  • Browser (Chrome recommended)
Don't have these? Start here

Recommended Tools

VS Code (Editor)Chrome DevToolsGit + GitHubTerminal/CMD
Choose your stack

Your Progress

0 of 10 topics completed

0%

OOP Foundations

1 week2 topics
0/2

1.What is OOP & Why It Matters

1-2 days

Understand the paradigm shift from procedural to object-oriented thinking and when to use OOP.

What you'll learn
  • Procedural vs Object-Oriented programming
  • Real-world analogy: objects, properties, behaviors
  • Benefits: reusability, modularity, maintainability
  • When OOP is the right choice vs functional programming
  • History: Simula, Smalltalk, and modern OOP languages
  • The four pillars overview: Encapsulation, Inheritance, Polymorphism, Abstraction
Practice Project

Compare Procedural vs OOP

Write a simple bank account program twice — once procedural (functions + dictionaries) and once with classes. Compare readability and extensibility.

2.Classes & Objects in Java

3-4 days

Learn how Java defines classes, creates objects, and manages memory with constructors and the new keyword.

What you'll learn
  • Class declaration and object instantiation
  • Instance variables and methods
  • Constructors (default, parameterized, copy)
  • The `this` keyword and self-reference
  • Static vs instance members
  • Memory: stack vs heap, garbage collection
  • Access modifiers: public, private, protected, default
  • Object class and toString(), equals(), hashCode()
Practice Project

Student Management System

Create a Student class with name, roll number, and grades. Implement constructors, getters/setters, and a method to calculate GPA.

🛠️Project Milestone 1

Student Management System

Create a Student class with name, roll number, and grades. Implement constructors, getters/setters, and a method to calculate GPA.

Build this before moving to the next stage

Encapsulation

4-5 days1 topics
0/1

3.Encapsulation in Java

3-4 days

Master Java's strict access control, getters/setters, and immutable object patterns.

What you'll learn
  • Access modifiers in depth: private, protected, public, package-private
  • Getter and setter methods with validation
  • Immutable objects (final fields, no setters)
  • Builder pattern for complex object construction
  • Encapsulation in packages and modules (Java 9+)
  • Record classes (Java 16+) for data carriers
  • JavaBeans convention
Practice Project

Bank Account with Validation

Build an immutable BankAccount class where balance can only change through validated deposit() and withdraw() methods. Use Builder pattern for construction.

🛠️Project Milestone 2

Bank Account with Validation

Build an immutable BankAccount class where balance can only change through validated deposit() and withdraw() methods. Use Builder pattern for construction.

Build this before moving to the next stage

Inheritance

5-6 days1 topics
0/1

4.Inheritance in Java

4-5 days

Master Java's single inheritance model, the extends keyword, method overriding, and the Object hierarchy.

What you'll learn
  • extends keyword and IS-A relationship
  • Method overriding with @Override annotation
  • super keyword (parent constructor and methods)
  • Constructor chaining in inheritance
  • final classes and methods (preventing inheritance)
  • Sealed classes (Java 17+)
  • Upcasting and downcasting with instanceof
  • Why Java doesn't allow multiple class inheritance
  • Composition vs Inheritance principle
Practice Project

Vehicle Hierarchy

Build Vehicle → Car, Truck, Motorcycle hierarchy. Add ElectricCar extending Car. Demonstrate method overriding, super calls, and instanceof checks.

🛠️Project Milestone 3

Vehicle Hierarchy

Build Vehicle → Car, Truck, Motorcycle hierarchy. Add ElectricCar extending Car. Demonstrate method overriding, super calls, and instanceof checks.

Build this before moving to the next stage

Polymorphism

5-6 days1 topics
0/1

5.Polymorphism in Java

4-5 days

Master method overloading, overriding, interfaces, and runtime dispatch in Java.

What you'll learn
  • Compile-time (static) polymorphism: method overloading
  • Runtime (dynamic) polymorphism: method overriding
  • Interface polymorphism (coding to interfaces)
  • Covariant return types
  • Generic types and bounded type parameters
  • Method dispatch and vtable concept
  • Functional interfaces and lambda expressions
  • Default methods in interfaces (Java 8+)
  • Pattern matching with instanceof (Java 16+)
Practice Project

Payment Processing System

Create a Payment interface with process() method. Implement CreditCard, PayPal, Crypto payments. Use a PaymentProcessor that accepts any Payment type polymorphically.

🛠️Project Milestone 4

Payment Processing System

Create a Payment interface with process() method. Implement CreditCard, PayPal, Crypto payments. Use a PaymentProcessor that accepts any Payment type polymorphically.

Build this before moving to the next stage

Abstraction & Interfaces

4-5 days1 topics
0/1

6.Abstraction in Java

4-5 days

Master abstract classes, interfaces, default methods, and the interface segregation principle.

What you'll learn
  • Abstract classes vs interfaces — when to use which
  • Interface with default and static methods
  • Multiple interface implementation
  • Interface segregation principle (ISP)
  • Marker interfaces (Serializable, Cloneable)
  • Functional interfaces (@FunctionalInterface)
  • Sealed interfaces (Java 17+)
  • Service provider interface (SPI) pattern
  • Dependency inversion with interfaces
Practice Project

Database Abstraction Layer

Define a Database interface with connect(), query(), disconnect(). Implement MySQLDatabase, MongoDatabase, InMemoryDatabase. Swap implementations without changing client code.

🛠️Project Milestone 5

Database Abstraction Layer

Define a Database interface with connect(), query(), disconnect(). Implement MySQLDatabase, MongoDatabase, InMemoryDatabase. Swap implementations without changing client code.

Build this before moving to the next stage

Advanced OOP Concepts

1-2 weeks4 topics
0/4

7.SOLID Principles

4-5 days

Learn the five foundational principles of object-oriented design that make code maintainable and extensible.

What you'll learn
  • Single Responsibility Principle (SRP): one reason to change
  • Open/Closed Principle (OCP): open for extension, closed for modification
  • Liskov Substitution Principle (LSP): subtypes must be substitutable
  • Interface Segregation Principle (ISP): no fat interfaces
  • Dependency Inversion Principle (DIP): depend on abstractions
  • Applying SOLID in real codebases
  • When SOLID becomes over-engineering
  • SOLID violations and code smells
Practice Project

Refactor a Monolith

Take a 200-line god class (e.g., UserManager that handles auth, email, DB, logging) and refactor it to follow all 5 SOLID principles. Document each change.

8.Creational Design Patterns

3-4 days

Learn patterns that control object creation — Singleton, Factory, Builder, and Prototype.

What you'll learn
  • Singleton: ensure one instance (and its problems)
  • Factory Method: delegate object creation to subclasses
  • Abstract Factory: families of related objects
  • Builder: step-by-step complex object construction
  • Prototype: cloning existing objects
  • When each pattern is appropriate
  • Anti-patterns: Singleton overuse
Practice Project

Document Generator

Build a document system: Factory creates PDF/HTML/Markdown docs. Builder constructs complex documents with headers, body, and footers. Prototype for templates.

9.Structural & Behavioral Patterns

4-5 days

Learn patterns for composing objects (Adapter, Decorator, Facade) and managing behavior (Observer, Strategy, Command).

What you'll learn
  • Adapter: make incompatible interfaces work together
  • Decorator: add behavior without subclassing
  • Facade: simplify complex subsystems
  • Composite: tree structures with uniform interface
  • Observer: event-driven decoupling
  • Strategy: interchangeable algorithms
  • Command: encapsulate requests as objects
  • State: behavior changes with internal state
  • Template Method: skeleton with customizable steps
Practice Project

Event-Driven Todo App

Build a todo app using Observer (UI updates on data change), Strategy (sort algorithms), Command (undo/redo), and Decorator (priority, deadline decorators on tasks).

10.Composition Over Inheritance

2-3 days

Understand why modern OOP favors composition and delegation over deep inheritance trees.

What you'll learn
  • Problems with deep inheritance: fragile base class, tight coupling
  • Composition: has-a vs is-a relationships
  • Delegation pattern
  • Mixins and traits as middle ground
  • Entity-Component-System (ECS) architecture
  • Dependency injection as composition
  • When inheritance IS the right choice
  • Real-world examples: React (composition), Game engines (ECS)
Practice Project

Game Character System

Build characters using composition: separate Movement, Attack, Health components. Characters assemble behaviors dynamically. Compare with a traditional inheritance approach.