Question: Answers posted chegg are wrong. Someone post new answer please The vending machine dispenses beverages, candy, chips, and gum. Each vending machine item has a

Answers posted chegg are wrong. Someone post new answer please

The vending machine dispenses beverages, candy, chips, and gum. Each vending machine item has a Name and a Price. A main menu must display when the software runs, presenting the following options: (1) Display Vending Machine Items (2) Purchase (3) Exit The vending machine reads its inventory from an input file when the vending machine starts. The vending machine is automatically restocked each time the application runs. When the customer selects "(1) Display Vending Machine Items", they're presented with a list of all items in the vending machine with its quantity remaining: Each vending machine product has a slot identifier and a purchase price. Each slot in the vending machine has enough room for 5 of that product. Every product is initially stocked to the maximum amount. A product that has run out must indicate that it's SOLD OUT. When the customer selects "(2) Purchase", they're guided through the purchasing process menu: Current Money Provided: $2.00 (1) Feed Money (2) Select Product (3) Finish Transaction The purchase process flow is as follows: Selecting "(1) Feed Money" allows the customer to repeatedly feed money into the machine in whole dollar amounts. The "Current Money Provided" indicates how much money the customer has fed into the machine. Selecting "(2) Select Product" allows the customer to select a product to purchase. Show the list of products available and allow the customer to enter a code to select an item. If the product code doesn't exist, the vending machine informs the customer and returns them to the Purchase menu. If a product is currently sold out, the vending machine informs the customer and returns them to the Purchase menu. If a customer selects a valid product, it's dispensed to the customer. Dispensing an item prints the item name, cost, and the money remaining. Dispensing also returns a message: All chip items print "Crunch Crunch, Yum!" All candy items print "Munch Munch, Yum!" All drink items print "Glug Glug, Yum!" All gum items print "Chew Chew, Yum!" After the machine dispenses the product, the machine must update its balance accordingly and return the customer to the Purchase menu. Selecting "(3) Finish Transaction" allows the customer to complete the transaction and receive any remaining change. The machine returns the customer's money using nickels, dimes, and quarters (using the smallest amount of coins possible). The machine's current balance updates to $0 remaining. After completing their purchase, the user returns to the "Main" menu to continue using 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!