SAP interview question

a question that could be solved using stack and oo design