Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.
luanAfons0Public archive

About

The objective of this project is to study all the OOP design patterns with the programming language Java.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

📚 Design Patterns

This project is a collection of practical examples and code implementations of popular Design Patterns, based on the content provided by Refactoring.Guru. The goal is to serve as a learning and reference resource for developers who want to understand and apply design patterns in real-world scenarios.


🧱 Current Patterns Implemented

🔨 Creational Patterns

These patterns deal with object creation mechanisms, trying to create objects in a manner suitable to the situation.

  • Singleton
    Ensures a class has only one instance and provides a global point of access to it.

  • Factory Method
    Defines an interface for creating an object, but lets subclasses alter the type of objects that will be created.

  • Abstract Factory
    Provides an interface for creating families of related or dependent objects without specifying their concrete classes.

  • Prototype
    Creates new objects by copying an existing object, known as the prototype.

  • Builder
    Separates the construction of a complex object from its representation, allowing the same construction process to create different representations.

🧠 Behavioral Patterns

These patterns are concerned with algorithms and the assignment of responsibilities between objects.

  • Strategy
    Enables selecting an algorithm's behavior at runtime by encapsulating each one as a separate class.

  • Observer
    Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.


🚧 Project Structure

Each pattern has its own folder with:

  • ✅ Code examples
  • 📄 Explanation of the pattern
/DesignPatterns
  /OOP-Concepts
  /Creational
    /Singleton-pattern
    /Factory-pattern
    /Abstract-Factory-pattern
    /Prototype-pattern
    /Builder-pattern
  /Behavioral
    /Strategy-pattern
    /Observer-pattern

🚀 How to Use

  1. Clone the repository:

    git clone git clone https://github.com/luanAfons0/DesignPatterns.git
  2. Navigate into the pattern you're interested in:

    cd DesignPatterns/Creational/Factory-pattern
  3. Run or read the examples.


🧩 Contributions

Feel free to contribute by:

  • Adding new design patterns
  • Improving current examples
  • Translating documentation

Please open an issue or submit a pull request!


📬 Contact

Made with 💡 by [Luan Henrique Afonso]
📧 [luan.henrique.afonso04@gmail.com]
🔗 LinkedIn Profile

About

The objective of this project is to study all the OOP design patterns with the programming language Java.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages