Question: I am Trying to modify Programming Problem #11 Drink Vending Machine Simulator in Gaddis Text Pg 538 in order to simulate a vending machine, I

I am Trying to modify Programming Problem #11 Drink Vending Machine Simulator in Gaddis Text Pg 538 in order to simulate a vending machine, I have worked on it a little from whatever was given but I can't seem to make the values dynamic and don't know how to write it back to the file. Here are the guidelines, please include proper output and in C# using visual basic, thanks 1. The drink data must come from a datafile, 1 row of data per drink. Each data element in the file should be separated by a delimiter of your choice. (I have the option of implementing a File Open dialog for the user to select the data file to load or just load the data on startup) 2. Display the cost of the drink and the number of drinks left. It should be dynamic values read from the datafile. Keep track of the number left as purchases are made because you don't want to over sell more than are in the machine 3. On exit write the data file back to storage. The data file will have updated drinks left values because of the purchases. The data file will then be used the next time to load On initial Startup... Drink Vending Machine Simulatoer Select a Drink Dinks Let Dirka Let Beer Drrks Lef Driniks Let Soda Tota Sales Drinks Le Load Dinks After file/data is loaded... Drrk Vending Machine Simulator Select a Drink $1.00 1.00 Beer 20 $1.00 $1.50 Grape Soda Denks Lef 20 20 $1.50 Tolai Sales Soda Ed Load Drinks I am Trying to modify Programming Problem #11 Drink Vending Machine Simulator in Gaddis Text Pg 538 in order to simulate a vending machine, I have worked on it a little from whatever was given but I can't seem to make the values dynamic and don't know how to write it back to the file. Here are the guidelines, please include proper output and in C# using visual basic, thanks 1. The drink data must come from a datafile, 1 row of data per drink. Each data element in the file should be separated by a delimiter of your choice. (I have the option of implementing a File Open dialog for the user to select the data file to load or just load the data on startup) 2. Display the cost of the drink and the number of drinks left. It should be dynamic values read from the datafile. Keep track of the number left as purchases are made because you don't want to over sell more than are in the machine 3. On exit write the data file back to storage. The data file will have updated drinks left values because of the purchases. The data file will then be used the next time to load On initial Startup... Drink Vending Machine Simulatoer Select a Drink Dinks Let Dirka Let Beer Drrks Lef Driniks Let Soda Tota Sales Drinks Le Load Dinks After file/data is loaded... Drrk Vending Machine Simulator Select a Drink $1.00 1.00 Beer 20 $1.00 $1.50 Grape Soda Denks Lef 20 20 $1.50 Tolai Sales Soda Ed Load Drinks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
