The ACME Company has approached you with a request to develop the psuedocode that will control the operations of their new series of vending machines. The program will be required to maintain the product inventory and money reservoir. The program should do the following operations:

1. Take as input an item number and money (The program terminates when a user enters a negative money amount and “000” as an item number.)

2. Check to see if the item exists. (if it doesn’t give the user a chance to re-enter the number)

3. Check to see if the money is sufficient enough to pay for item. (If not request more money)

4. Check to see if item is in stock. (If not user should be notified with the choice of selecting new item or cancelling the order)

5. If the item is in stock and the money is sufficient, the program should provide change and update the money reservoir and product inventory.

6. When the dispensing change, the program must insure that it always returns the correct amount of change based on the coins available in the reservoir. For example, if a user is owed $0.30 then the program may return 1 quarter and 1 nickel. However, if there are no quarters, the program should be smart enough to return a different combination of that doesn’t include quarters. (If no combination of change exists, the user’s order should be cancelled and the user should be allowed to make an alternate selection)

7. Once a transaction is complete, the user should be prompted to make a new selection. The program will end when a user enters a negative money amount and “000” for the item number.

Product Inventory:

Below is a breakdown of the products offered by the vending machine. In addition to the product names, the prices, item number and quantities are also listed below. The user will use the item number to select the product they wish to purchase.

Product Name Item Number Price Quantity in Stock

Candy Bar 123 $0.60 60

Gum 124 $0.35 75

Potato Chips 125 $0.75 40

Trail Mix 126 $.050 50

Breakfast Bar 127 $0.80 45

To develop the pseudocode that will control the operations of the vending machines for the ACME Company, you can follow these steps:

1. Initialize the money reservoir and product inventory with the given information:

- Set the money reservoir for each type of coin (quarter, dime, nickel, etc.).
- Set the product inventory for each item number with the respective quantity in stock.

2. Start a loop to continually accept user inputs for item number and money:

- Prompt the user to enter an item number and money.
- Check if the user entered a negative money amount and "000" as the item number. If so, exit the loop and terminate the program.
- If the item number does not exist in the product inventory, prompt the user to re-enter the number.
- If the item exists, check if the money is sufficient to pay for the item.
- If the money is not sufficient, request more money from the user.
- If the money is sufficient, check if the item is in stock.
- If the item is not in stock, notify the user and give them the option to select a new item or cancel the order.
- If the item is in stock and the money is sufficient, provide the change and update the money reservoir and product inventory.

3. To provide the correct amount of change, you can implement a change dispensing algorithm:

- Calculate the amount of change owed to the user.
- Start with the largest value coin (quarter) and check if you have enough coins in the reservoir to make the change.
- If there are enough coins, subtract them from the reservoir and update the amount of change owed.
- If there are not enough coins, move to the next largest coin (dime) and repeat.
- Continue this process until you have dispensed the correct amount of change or until you have checked all available coin denominations.
- If you cannot make the exact change, cancel the user's order and allow them to make an alternate selection.

4. Once a transaction is complete (change has been provided), prompt the user to make a new selection and continue the loop.

5. The program will end when a user enters a negative money amount and "000" for the item number, at which point the program will terminate.

Remember that this is just a pseudocode for the program logic. You will need to convert this pseudocode into an actual programming language to implement and test the vending machine program.