Domanda di colloquio di NetApp

How would you write class/method for vending machine?