Java application to simulate a vending machine