Factory Method: The Restaurant Kitchen Pattern
When I first read about the Factory Method pattern, every explanation sounded like this: "Define an interface for creating an object, but let subclasses decide which class to instantiate."
I read that sentence five times and understood nothing. So here's the explanation I wish someone had given me.
Order the biryani. Don't cook it.
You walk into a restaurant and say: "One biryani please."






