Question: Create a C++ program. Create a vending machine simulation program using C++. The program should have 5 products total, each product must have a price,

Create a C++ program.

Create a vending machine simulation program using C++.

  1. The program should have 5 products total, each product must have a price, name, and the quantity currently in stock.
  2. The program should have a menu that displays the product's price, name, and quantity currently in stock, the program must also have an option to exit.
  3. The program should allow the user to choose an item that is currently in stock for purchase, or to exit the program.
  4. The program should collect payment.
  5. The program should display change when appropriate.
  6. The program should decrement the quantity of the product purchased from currently in stock.
  7. Upon exiting the program, it should display the total number of items purchased and the total amount spent.

#include #include

using namespace std;

int main(){

// Code goes here

// More code outside of the int main may be added

return 0; }

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!