Vending machine is a machine which dispenses goods/items such as snacks, soft
drinks, chocolates, cookies, chips and other selected items to customers automatically,
after the customer inserts currency or coins into the machine.

The project is required to design, implement to simulate a vending machine. The program will work with item names, their prices, and the current number available in the machine. The machine should display different items. When the application starts, the vending machine will display each type of goods or items and number of items available in the machine. Each time the customer selects an item, the application should subtract 1 from the quantity of the selected item. It should also update and display the total amount of sales. The customer should be able to buy multiple items during the same session.

The customer can either quit the program or pick an item from the machine. If the user
selects an item, the program will notify the customer that an amount must be entered for
payment. The program will then display the amount of change that would be returned
and subtract one from the number of items left in the machine for that item. If the customer selects an item that is sold out, a message to that effect will be displayed. The loop then repeats. When the customer chooses to quit the program, the program must display the total amount of sales the machine earned during the current run. Then, print out a summary table of the machine's final state, which includes the drink names, prices,
and food items available in the machine at that point.

The program should do the following:

  1. Show the customer the different products sold by the candy machine as Main Menu
  2. The available quantity as well as the cost of each item
  3. Let the customer make the selection.
  4. Show the customer the cost of the item selected.
  5. Accept money from the customer.
  6. Release the item.
  7. Display a summary report which includes the total sales of all items (itemized) at the end of the day
  8. Show all error messages with correction actions
  9. Perform input data validation to ensure correct input has been entered
  10. Exit the application

Please take time when you create a new discussion. This reads as if you dumped some homework assignment here. That rarely ends well.

Show your work, explain where you had an issue you couldn't overcome.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.