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

Love podcasts or audiobooks? Learn on the go with our new app.