Write a program that simulates a soft drink machine. The contents of the machine and associated prices are as follows:
Drink Name Cost Inventory in Machine
Cola .75 20
Root Beer .75 20
Lemon-Lime .75 20
Cream Soda .80 20
Water 1.00 20
Energy Drink 5.00 20
PART 1: Customer Interface
When the thirsty customer, Charlie Brown, approaches the drink machine:
The beverage choices should be displayed.
Charlie should be allowed to quit the program or pick a drink.
If the Charlie selects a drink, he will enter the amount of money that is to be inserted into the drink machine.
If the amount that Charlie enters is less than the amount needed for the purchase, message Charlie and let him know he needs more cash.
Input Validation: The machine cannot handle negative values or values greater than $5.
The amount of change that would be returned should be displayed.
The inventory for the drink purchased should be reduced.
If Charlie selects a drink that is sold out, a message should be displayed.
When Charlie indicates he does not want to make any further purchases, the total amount of his purchases should be displayed.
PART 2: Manager Interface
When the manager, Lucy accesses the machine she will want to know:
Total sales
Inventory levels of all beverages. Beverages with < 5 in inventory should warn Lucy to refill the machine.
Lucy should have the option to adjust beverage inventory based on the amount added to the machine.
hello,
place your confidence in my C/C++ knowledge and experience.
you better hire me while i'm in mood of writing ticket systems and coffee machines ;)
greets, srdjan