Factory Design Pattern
This is one of the most widely used design patterns, and a really popular question in interviews. Using a really simple example, we’re going to understand why exactly this pattern is useful and how to implement it in code. In the Factory pattern, we create objects without exposing the creation logic to the client and …