Question: P 1 : The machine will dispense drinks gatorade, red bull, coke, diet coke P 2 : Prices - Gatorade $ 2 , RedBull$ 2

P1: The machine will dispense drinks gatorade, red bull, coke, diet coke
P2: Prices-Gatorade $2, RedBull$2.25, cokeldiet $1.50
P3: The vending machine accepts only quarters and dollar bills. If the user enters enough money, the item selected will dispense. If canceled, any money inserted money is returned. If not enough money is inserted, they can add more or cancel.
P4: The inputs arei quarters, dollar bills, cancel button, vend but ton.
P5: The outputs are: 254,504,754,$1,$1.25,$1.50, coke, diet coke, $1.75,$2,$2.25, Gatorade, Red Bull.
P6: State Table
State Diagram
Can you finish the State Table and create a State Diagram on paper.
P 1 : The machine will dispense drinks gatorade,

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 Programming Questions!