Pregunta de entrevista de NetApp

How would you write class/method for vending machine?