HW3 1. The vending machine (VMC) system requirements are as follows: The VMC dispenses goods: (1) very large candy (VC) at 15¢, (2) large candy (LC) at 10¢, and (3) a small candy (SC) at 5¢. The vending machine only deals in nickels, and dimes. The VMC gives the proper change after the product selection is made. The VMC must tabulate the amount being deposited. The following rule applies to the VMC’s behavior: a) The VMC remains idle until a customer or owner begins to interact with the VMC. When a selection button is depressed the VMC indicates the required amount needed. b) If the full amount needed has been deposited then dispense the proper candy and display: Thank You!.
c) If an insufficient amount (possibly zero) has been deposited then display: remaining amount needed. d) If an over amount has been deposited then dispense the proper candy and change and display: Thank You!. e) Finally, there is a special selection that will allow the customer to get a refund of all the deposited money (coin return).
Thus, once the customer deposits coins and makes a selection that matches the amount deposited (or more) the candy is dispensed and he/she will retrieve the candy and change (if applicable).
The VMC owner unlocks the VMC to stock the candy and the change and retrieves the profits from the money bin. Once the maintenance activities are completed, the owner will lock the VMC. Selection means that a button is selected / deselected. Given the system requirements (above) for a vending machine, describe the system using Zed. Vending Machine Maintenance
The Term Paper on Climate Change
Introduction What is the oceans role in climate? The oceans play a vital and pivotal role in the distribution of life sustaining water throughout our planet. 86% of the evaporation that occurs on earth is over the oceans. The oceans are the planets largest reservoir of water transferring huge amounts of water around the hydrological cycle. In fact the oceans dominate the hydrological cycle, for ...
Key extract Deposit coin(s) Key insert
Tabulate
U = Under amount C = Correct amount O = Over amount S = Select small candy M = Select medium candy L = Select large candy
Idle
Select
U S/M /L
Deselect Retrieve candy (and change)
Tabulate
Select
Star t .10 $ .10 S C
.05
$ .05 .10
Under amount
.05
Display msg: AMOUNT NEEDED IS: $XX Select Correct amount Display msg: Thank You and dispense candy Select Over amount Display msg: Thank You and dispense candy and change
M /L U
$ .15 S M O L C U