help me to code vending machince with following specification


Joined
Nov 20, 2015
Messages
1
Reaction score
0
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.
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top