Question d’entretien chez Virgin Gates

How can we use this design pattern to solve this problem ?