This repository contains implementations of various design patterns. Each pattern is explained with a real-world example and structured code.
-
- Used for choosing a behavior dynamically at runtime.
- Example: Payment processing system with multiple payment methods (Credit Card, PayPal, Bitcoin).
-
- Used when an object should notify multiple subscribers about changes.
- Example: News subscription system where users receive updates when a new article is published.
-
- Used for creating objects without specifying their exact class.
- Example: A notification system to notify users via different mediums like
Email,WhatsApp, orPhoneTextdynamically.
-
- Used for constructing complex objects step-by-step.
- Example: Meal Builder, where users can customize their burger, drink, and extras.
1οΈβ£ Navigate to any pattern directory to find explanations, code, and examples.
2οΈβ£ Each pattern contains a README.md with details.
3οΈβ£ Run the provided Python scripts (main.py) to see the pattern in action.
- More patterns will be added soon!
- Contributions are welcome to expand the repository.
Feel free to fork, modify, or contribute to this project! If you have suggestions, open an issue or pull request.
π Happy Coding! π