Domanda di colloquio di FanDuel

How would you solve this same problem in another context (reusability/OOP design)