Meriyemelhajoui / Design-Patterns

Explore a collection of commonly used design patterns implemented in Java. This repository showcases examples of Singleton, Factory, Abstract Factory, Adapter, Strategy, and Builder patterns. Each pattern is implemented in its own package, providing clear demonstrations and usage guidelines.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Explore a collection of commonly used design patterns implemented in Java. This repository showcases examples of Singleton, Factory, Abstract Factory, Adapter, Strategy, and Builder patterns. Each pattern is implemented in its own package, providing clear demonstrations and usage guidelines.


Languages

Language:Java 100.0%