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:
- Show the customer the different products sold by the candy machine as Main Menu
- The available quantity as well as the cost of each item
- Let the customer make the selection.
- Show the customer the cost of the item selected.
- Accept money from the customer.
- Release the item.
- Display a summary report which includes the total sales of all items (itemized) at the end of the day
- Show all error messages with correction actions
- Perform input data validation to ensure correct input has been entered
- Exit the application