Vending Machine Program
- Dev C++ Vending Machine Program In Java
- Dev C 2b 2b Vending Machine Program Free
- Dev C++ Vending Machine Program Manual Pdf
- Dev C%2b%2b Vending Machine Programmer
Program Specifications/Requirements.
• Create a C++ program that simulates a vending machine.
Refrigerated Beverage Vending Machine: A self-contained system designed to accept consumer payments and dispense bottled, canned, and other sealed beverages at appropriate temperatures without on-site labor intervention. Indoor Vending Machine: A machine intended for placement inside a building and not subjected to the effects of weathering. All of our new vending machines come with a one year warranty which covers all parts of the machine. All of our used, pre-owned or refurbished machines come with a 3 month warranty. Best of all, when you buy from The Discount Vending Store, we offer a lifetime of technical support on every vending machine we sell. Write a C program to simulate the tasks of a vending machine. The machine accepts only coins from the customer. Initially, it displays the following message on screen: 'Please insert coins'. When a customer inserts a coin, the machine asks the him/her to select a drink (if the coins are enough) through entering its code. GVC2 CONTROLLER SOFTWARE (Revision 7370 or later) This manual contains only the programming instructions for the GVC2 Controller used on the vending machines listed below. Please refer to your service manual for other information. VENDOR MODEL SM5700 3512, 3512A HR23 HR32 HR40 3526, 3526A 3510, 3510A 3509, 3509A RRF-3W RRF-4W RRF-5W 3523, 3523A.
• The vending machine holds six items numbered 1 through 6. The cost of each item is as follows:
Item# Cost
1 $1.50
2 $.75
3 $.90
4 $.75
5 $1.25
6 $.75
• When the program runs, a menu will appear showing the user the options they have to purchase (item # and cost).
• Allow the user to enter two inputs. (Note: You may ask for these on separate lines).
o The item number desired.
o The amount of money they are depositing into the vending machine.
• Your program should include input validation to check to make sure that the input is the following. Display an error message and ask for the input again if the input does not meet these conditions.
o Ensure the item # is a value of 1 through 6.
o Ensure cost entered is at greater than 0 and less than or equal to 10.
o Extra credit #1: Ensure item # an integer (not a float or string).
o Extra credit #2: Ensure cost is an integer or float (not a string).
• The following information should be displayed to the user once an item and an amount of money has been entered:
• Display the following if the money entered was sufficient for the item selected (format all money/currency with $ before and two digits to right of decimal place):
Thank you for purchasing item # 5. Your change is $ 3.50
If the amount of money entered was the exact amount, the following similar message would be displayed.
Thank you for purchasing item # 5. Your change is $ 0.00
• If the money entered was insufficient, your program should display a message indicating the money entered was insufficient, how much additional money needs to be entered, and continue to ask for an additional amount of money until enough money has been entered to purchase the selected item.
Please enter an additional $.50
• Give the customer the option to choose another item to purchase or to quit (Y or N).
o Extra Credit #3: ensure input entered is Y, Yes, YES, y, N, No, NO, or N. If not, display an error message and require the user enter another response.
• Each customer can only purchase a maximum of three items. The program will automatically quit after the third purchase.
• When the programs ends (i.e. the user indicates they do not want to make another purchase or they have completed purchasing their third item), the following summary information is displayed:
Number of items purchased: 2
Total cost of all items purchased: $2.75
Total amount of money inserted: $5.00
Total amount of change returned: $2.25
• You must use at least one user-defined module/function in a meaningful way appropriate to the program. It is up to you whether you want to use lists/arrays.
Sample Program Run #1
| Vending Machine |
Item # Cost
------ -----
1 $1.50
2 $0.75
3 $0.90
4 $0.75
5 $1.75
6 $0.75
----------------------------------
Enter the item number you want (1-6): 1
Enter your money amount (e.g. 1.5 for $1.50, .50 for $0.50, etc.): 11
Invalid $ amount. Enter your money amount (e.g. 1.5 for $1.50, .50 for $0.50, etc.): 10
Thank you for purchasing item # 1. Your change is $8.50
Do you want to make another purchase (Y or N)? n
Purchase Summary
------------------------------------------
Number of items purchased: 1
Total cost of all items purchased: $1.50
Total amount of money inserted: $10.00
Total amount of change returned: $8.50
Sample Program Run #2
| Vending Machine |
Item # Cost
------ -----
1 $1.50
2 $0.75
3 $0.90

4 $0.75
5 $1.75
6 $0.75
----------------------------------
Enter the item number you want (1-6): 7
Invalid item choice. Enter valid item number (1-6): dddddd
Invalid item choice. Enter valid item number (1-6): 1
Enter your money amount (e.g. 1.5 for $1.50, .50 for $0.50, etc.): .5
Please enter an additional $1.00
Enter your money amount (e.g. 1.5 for $1.50, .50 for $0.50, etc.): 1
Thank you for purchasing item #1. Your change is: $0.00.
Do you want to make another purchase (Y or N)? y
| Vending Machine |
Item # Cost
------ -----
1 $1.50
2 $0.75
3 $0.90
4 $0.75
5 $1.75
6 $0.75
----------------------------------
Enter the item number you want (1-6): 2
Enter your money amount (e.g. 1.5 for $1.50, .50 for $0.50, etc.): 3
Thank you for purchasing item # 2. Your change is $2.25
Do you want to make another purchase (Y or N)? y
| Vending Machine |
Item # Cost
------ -----
1 $1.50
2 $0.75
3 $0.90
4 $0.75
5 $1.75
6 $0.75
----------------------------------
Enter the item number you want (1-6): 3
Enter your money amount (e.g. 1.5 for $1.50, .50 for $0.50, etc.): .9
Thank you for purchasing item #3. Your change is: $0.00.
Thank you. You have reached your maximum number of purchases (3).
Purchase Summary
------------------------------------------
Number of items purchased: 3
Total cost of all items purchased: $3.15
Total amount of money inserted: $5.40
Total amount of change returned: $2.25
Sample Program Run #3
| Vending Machine |
Item # Cost
------ -----
1 $1.50
2 $0.75
3 $0.90
4 $0.75
5 $1.75
6 $0.75
------------------------------
Enter the item number you want (1-6): 1
Dev C++ Vending Machine Program In Java
Enter your money amount (e.g. 1.5 for $1.50, .50 for $0.50, etc.): .5
Please enter an additional $1.00
Enter your money amount (e.g. 1.5 for $1.50, .50 for $0.50, etc.): .5
Please enter an additional $0.50

Dev C 2b 2b Vending Machine Program Free
Enter your money amount (e.g. 1.5 for $1.50, .50 for $0.50, etc.): 1
Thank you for purchasing item # 1 . Your change is $0.50
Do you want to make another purchase (Y or N)? n
Dev C++ Vending Machine Program Manual Pdf
Purchase Summary------------------------------------------
Dev C%2b%2b Vending Machine Programmer
Number of items purchased: 1
Total cost of all items purchased: $1.50
Total amount of money inserted: $2.00
Total amount of change returned: $0.50