System Design
Object-Oriented Design
Design Pattern Glossary

Design Pattern Glossary (OOD)

Common design patterns used in Object-Oriented Design interviews to solve recurring problems.


Creational Patterns

How objects are created.

  • Factory Pattern: used in Chess Game to create pieces without specifying their concrete classes.
  • Singleton Pattern: used in the Elevator System for the system controller to ensure only one instance handles dispatching.

Structural Patterns

How objects are composed.

  • Composite Pattern: used in the File System to treat files and directories uniformly.
  • Decorator Pattern: used in the Online Shopping System for adding shipping options (insurance, express) to an order.

Behavioral Patterns

How objects communicate.


[!TIP] Don't over-engineer! Apply patterns only when they solve a specific problem like "handling many if-else blocks" or "decoupling providers."