Skip to content

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.

Notifications You must be signed in to change notification settings

Meriyemelhajoui/Design-Patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages