Microsoft interview question

Design a vending machine