Vending machine
The vending machine dispenses two items: a can of soda or a candy bar. The can
of soda costs $7 while the candy bar costs $4.
1. There is an input select for each product and a reset input that takes the machine
to the idle state.
2. The machine only accepts $1 and $5 bills.
3. When sufficient funds have been inserted, the product selection is made. The
maximum amount of money that can be inserted is $10.
4. Change is dispensed but only in $1 bills.
5. If a product selection is made and insufficient funds have been inserted, the
machine illuminates an “insufficient funds” display and waits for more money to
be inserted.
6. The transaction can be cancelled at any time with the appropriate refund.
7. If the product is not available, all money is returned.
8. When a product is dispensed the customer must take it before a new transaction
can start.
The vending machine dispenses two items: a can of soda or a candy bar. The can
of soda costs $7 while the candy bar costs $4.
1. There is an input select for each product and a reset input that takes the machine
to the idle state.
2. The machine only accepts $1 and $5 bills.
3. When sufficient funds have been inserted, the product selection is made. The
maximum amount of money that can be inserted is $10.
4. Change is dispensed but only in $1 bills.
5. If a product selection is made and insufficient funds have been inserted, the
machine illuminates an “insufficient funds” display and waits for more money to
be inserted.
6. The transaction can be cancelled at any time with the appropriate refund.
7. If the product is not available, all money is returned.
8. When a product is dispensed the customer must take it before a new transaction
can start.