Question: write a program that uses liuts to control a snack vending machine. The machine contains 10 different kinds of snacks, labeled 'A' thru Each snack

 write a program that uses liuts to control a snack vending

write a program that uses liuts to control a snack vending machine. The machine contains 10 different kinds of snacks, labeled 'A' thru Each snack cost $125 Requirements: The machine stocks 10 units of each snack type when the program starts. - Customets enter the letter of the snack to buy, the quantity of snacks, and the money to pay for them. Your program stall display Enjoy your snack only if the snack is in stock and the customer provided enough money to pay for it - Your program shall also display the corresponding amount of change - The program hal keep track of the snacks sold. - If the customer selects an out-of-stock snack, the program hal indicate no and end the transaction . If the customer does not provide enough money, the program shall display the appropriate messages and the customer shall not get the snack - The program shall runs until is entered as the snack label this signals the vending machine to shut down." After the shut down your program shall show the number of items sold of each kind of snack and the total sales Assume the label for the items are given in uppercase lettere in use the ordo function to convert item tabele into index values) Here is a sample Interaction with the Vending Machine

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!