Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I know it\'s long, but any help will be greatly appreciated. Here is the assignm

ID: 3621685 • Letter: I

Question

I know it's long, but any help will be greatly appreciated. Here is the assignment:
The Vending Machine, Part Deux

Your vending machine will have a list of products and serve customers just like
before, but how it does all this will change:

1) There are two (2) configuration files for the vending machine. You will have to
read each configuration in. You will use arrays to store the data, and work with it.
One contains information about the machine, the other about the products.

2) The user will deposit money first and then order a product. They should not be able
to order a product more expensive than their money already deposited. They may add
more money when they wish and get their change (unused money) when they want.

3) As the machine operates, it keeps a log (in a file) of what is happening.

4) As the machine sells products, the inventory for those products is adjusted. If the
inventory of a particular product goes below its low-inventory threshold, that product
should have a low-inventory note next to it in the menu. If it is sold out, it is not shown on the menu.

Configuration File Formats:
You will have to read in and parse this file properly, or your program won't work.

Here is the format for the machine configuration file:
Line # information on this line
1 The name of the vending machine
2 The vending machine ID #
3 The vending company which owns the machine
4 Advertising message to be displayed after vending a product
5 Goodbye message to be displayed after returning unused deposited money

Here is a description of the product configuration file. Each line will look like this:
17:####:Snickers:0.75:5

Where:
17 is the number of initial inventory of the product
#### is the product id number (an actual number, not pound signs)
Snickers is the product name
0.75 is the cost of one of the product
5 is the low-inventory threshold
There will be up at most 20 products. Keep reading them until there aren't any mo

Explanation / Answer

Write a program implementing and demonstrating the class Stack data structure. The stack will have the following attributes and requirements: 1. A maximum capacity of 20 elements. 2. The stack will hold integers. 3. Include logic for stack underflow and overflow. 4. Comment all class definitions and member methods/functions. To test the program, write a main driver program which will accept up to 20 numbers from the keyboard. After accepting these numbers into the stack, print them out in reverse order. Example: Input: 1 2 3 4 5 Output: 5 4 3 2 1