Question: Using C++ Programming Assignment #7 Simulate a Vending Machine CS 1428.302, Spring 2018 Instructor: Jill Seaman Due: in class Tuesday, 4/24/2018 (upload electronic copy by

Using C++
 Using C++ Programming Assignment #7 Simulate a Vending Machine CS 1428.302,
Spring 2018 Instructor: Jill Seaman Due: in class Tuesday, 4/24/2018 (upload electronic
copy by 9:00am) Write a program that simulates a soft drink machine.

Programming Assignment #7 Simulate a Vending Machine CS 1428.302, Spring 2018 Instructor: Jill Seaman Due: in class Tuesday, 4/24/2018 (upload electronic copy by 9:00am) Write a program that simulates a soft drink machine. The program should use a structure that stores the following data Drink Name Drink Cost Number of units currently in the machine The program should create an array of five structures. The elements should be initialized with the following data Drink Name Coke (can) Coke (bottle) Mountain Dew (can) Water Full Throttle Cost 0.75 1.25 0.75 1.25 2.00 Number in Machine 8 8 8 8 8 Each time the program runs, it should enter a loop that performs the following steps: A list of drinks is displayed on the screen. The user should be allowed to either quit the program or pick a drink. If the user selects a drink (that has not sold out), the progranm should display the cost of the drink and subtract one from the number of units of that drink left in the machine. If the user selects a drink that has sold out, a message should be displayed. The loop then repeats. When the user chooses to quit the total amount of money the machine earned. Sample output is on the class website. program it should display the number of units of each drink left in the machine and the

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!