📘 Design Pattern Interview Scenarios (Monolith & Microservices)
✅ Scenario 1: Payment Gateway Integration using Factory Pattern 🧩 Problem Statement:An application needs to support various payment modes such as Credit Card, PayPal, UPI, and Net Banking. Instantiating all services eagerly is inefficient in terms of memory and performance. The application should only instantiate the required payment service based on the user’s choice at runtime. 🎯 Objective: 🛠️ Solution: Factory PatternThe Factory Pattern is ideal when the creation of…