Thank you for a detailed reply Justin Coulston

I agree that enums in certain situations should be avoided. Where do you see enums in the above solution?

In the solution provided, I see that a new class needs to create for every implementation. I am not sure it would be the right solution in our case when we can have more than 10 types of offers.

What do you think?

--

--

Senior Staff Engineer @freshworks. Ex-McKinsey/Microsoft/Slideshare/SAP, Tech Enthusiast, Passionate about India. Opinions are mine

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhinav Dhasmana

Senior Staff Engineer @freshworks. Ex-McKinsey/Microsoft/Slideshare/SAP, Tech Enthusiast, Passionate about India. Opinions are mine