源码简介: |
本案例模拟饮料自动售货机的销售过程。首先由顾客投币,机器显示投币金额。接下来顾客选择要购买的饮料,如果投币金额足够并且所购饮料存在,则提示用户在出口处取走饮料,同时找零。如果投币金额不足,则显示提示信息。如果所购饮料已经售完,显示售完信息-This case simulation drinks the vending machine the sales process. First of all by the customer coin, slot machine showed that amount. The next to buy drinks customer choice, if the slot for a drink enough amount and existence, the prompt the user at take beverage, and at the same time change. If the coin is not paid, they showed a hint of information. If buy drinks have sold out, show sold out information
|