Question d’entretien chez FanDuel

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