Pregunta de entrevista de Siemens

Given these scenarios, what is the best design pattern that implement them. Oop questions. Two medium level leetcode problems