Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 1.34 KB

README.md

File metadata and controls

27 lines (17 loc) · 1.34 KB

Design Patterns 🛠️

This repository contains examples of commonly used design patterns implemented in Java.

Singleton Pattern 🏢

The Singleton pattern ensures that a class has only one instance and provides a global point of access to that instance.

Factory Pattern 🏭

The Factory pattern provides an interface for creating objects but allows subclasses to alter the type of objects that will be created at runtime.

Abstract Factory Pattern 🏗️

The Abstract Factory pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes.

Adapter Pattern 🔄

The Adapter pattern allows incompatible interfaces to work together. It converts the interface of a class into another interface clients expect.

Strategy Pattern 🎯

The Strategy pattern defines a family of algorithms, encapsulates each one of them, and makes them interchangeable. It allows changing the algorithm at runtime.

Builder Pattern 🔨

The Builder pattern separates the construction of a complex object from its representation, allowing the same construction process to create different representations.


Each pattern is implemented in a separate package with corresponding Java files showcasing its usage and implementation.

Feel free to explore each pattern for detailed explanations and examples.