vending machine emulator in java