Skip to content

Amanacer/Design-Pattern-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

β˜• Java Design Patterns

Design Patterns Logo

πŸš€ Explore the power of Object-Oriented Design with 20+ hands-on Java implementations of the most essential Design Patterns.
Sharpen your system design skills, prepare for LLD interviews, and become a better architect.


πŸ”₯ What's Inside?

A curated collection of Java implementations of GOF (Gang of Four) design patterns, each with:

  • πŸ”Ή Simple and modular code
  • πŸ”Ή Real-world use-case analogy
  • πŸ”Ή Clean architecture separation

🧠 Patterns Included

πŸ—οΈ Creational

  • βœ… Abstract Factory
  • βœ… Factory Method
  • βœ… Builder
  • βœ… Singleton
  • βœ… Prototype

🧱 Structural

  • βœ… Adapter
  • βœ… Decorator
  • βœ… Proxy
  • βœ… Composite
  • βœ… Bridge

πŸ”„ Behavioral

  • βœ… Observer
  • βœ… Strategy
  • βœ… Command
  • βœ… Iterator
  • βœ… Chain of Responsibility
  • βœ… Template Method

πŸ“‚ Folder Structure

Design-Patterns-main/
└── src/
    β”œβ”€β”€ AbstractFactory/
    β”œβ”€β”€ Adapter/
    β”œβ”€β”€ Builder/
    β”œβ”€β”€ Decorator/
    └── ...

Each folder contains:

  • πŸ§ͺ Pattern Classes
  • πŸ§‘β€πŸ’» Client.java with a demo scenario

πŸ’‘ Visual Learning

Design Pattern Overview

Visual source: Refactoring.Guru


βš™οΈ Getting Started

Prerequisites

  • Java JDK 8 or higher
  • Any Java IDE (Eclipse, IntelliJ, VS Code)

Run Example

cd src/Builder
javac *.java
java Client

πŸ“ˆ Use Cases

βœ… LLD Interviews
βœ… System Design Practice
βœ… Java Architecture Skills
βœ… Portfolio Enhancement


πŸ™‹β€β™‚οΈ Author

Aman Singh
πŸ”— LinkedIn
πŸ“« singha0391@gmail.com


⭐ Show Some Love

If you like this project, consider giving it a ⭐ star on GitHub and share it with your peers!

About

🧩 Design Patterns in Java – OOPs & LLD Essentials A curated collection of frequently used object-oriented design patterns implemented in Java β€” including Singleton, Factory, Observer, Strategy, Builder, and more. Great for mastering LLD, system architecture, and writing clean, extensible code.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages