Question: The objective of this assignment is to construct a state diagram for a state machine that will simulate a vending machine. This vending machine sells

The objective of this assignment is to construct a state diagram for a state machine that will simulate a vending machine.

This vending machine sells gum, candy bars and drinks. Gum costs 10 cents, a candy bar costs 20 cents and a drink 45 cents. Three buttons on the front panel select whether gum, a candy bar or a drink is to be purchased. The machine will accept nickels, dimes and quarters and three buttons on the front panel simulate inserting either a nickel, dime or a quarter. The machine checks after every coin is inserted and if the amount paid is equal to or greater than the price of the item selected the item is vended and any extra money paid is returned.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!