Pergunta de entrevista da empresa SAP

a question that could be solved using stack and oo design