Abhinav Dhasmana
1 min readSep 3, 2018

--

Thank you William Bartlett for reading the blog and leaving a comment. Of course there is so much to learn and that is why I am here :)

As others have explained, you have not really used the strategy pattern because the business logic for assigning an offer to a user is gone : If I understand you right, this logic is not gone. See this discussion

I am not sure that an Offer class should have the knowledge of a User . We should be able to create an Offer without the knowledge of User. The logic of assigning an offer to a User can live in User class/Another class.

Let me know what do you think.

Happy Learning!!

--

--

Abhinav Dhasmana

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