📄️ Factory method
It provides an interface for creating objects in a superclass dynamically, while allowing subclasses to customize the creation process.
📄️ Abstract Factory
Crafting Software Universes: A Journey through the Abstract Factory Pattern
📄️ Builder
Imagine you're a developer building a character creation system for a role-playing game. This character can have various attributes like strength, agility, intelligence, and can be equipped with different weapons and armor. Now, let's say you create a Character class with a constructor that takes all these attributes and equipment as individual arguments.
📄️ Prototype
Let's suppose that you have a car object that has some attributes like color, license, model, etc. in this case you have a red car with the license plate MMX502 and you need to create the same car in another object like a copy car2 because you need the exact same attributes and to change some other attributes like the license plate.
📄️ Singleton
Unveiling the Singleton Pattern: Unlocking the Power of One