Coding round: How would you add an extra discount offered as an extra use case?
Anonymous
Answer: Add that extra if or switch case. But the interviewer was more concerned about how can I refactor his discount in the Price class rather than Product class. Interviewer failed to understand where the business logic should be and the pros and cons of such a design.
Check out your Company Bowl for anonymous work chats.