Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Write a C++ menu driven program to simulate a vending machine using functions. The vending machine has the following items: Item name Item price
1. Write a C++ menu driven program to simulate a vending machine using functions. The vending machine has the following items: Item name Item price $0.95 $0.75 Coke Doritos Snickers Chex Mix $0.55 $0.60 $0.90 Pepsi Maximum capacity for each item is 30. If the number of items for each of the above is less than 5 then refill it. The machine accepts quarters, dimes, and nickels, and $1 or $5 bills. There are three different containers for each coin. There should be at least 20 nickels, 20 dimes, and 20 quarters in each container. If each container has more than 100 coins then remove coins from container and leave only 20 coins. If amount of $1 bill exceed $100 then remove $1 bill and leave 20 $1 bill in the container. If amount of $5 bill exceed $300 then remove $5 bills and leave 20 $5 bills in the container The cost of the items is 35% of the sell price. Labor cost is 25% of the sell price. Overhead is 5% of the sell price. Your program must run for 6 hours per day. Your program must have at least the following functions: 1. main function 2. menu function 3. check if the machine is ON or Off 4. Turn the machine ON if it is OFF 5. refill vending machine 6. refill coins containers 7. remove coins from any one of the container if it exceeds 100 coins 8. select item from vending machine 9. accept coins 10. Check for coin validity. If it is a foreign coin then reject it 11. Check the price. If the amount received is less than the item's price then ask for more money. If the amount received is more than the item's price then return change.) 12. return change 13. calculate the sell for each item per hour 14. calculate the total sell for each item per day 15. calculate the total sell for all items 16. compute total cost of all items 17. compute labor cost 18. compute overhead 19. compute profit 20. Display 1. Write a C++ menu driven program to simulate a vending machine using functions. The vending machine has the following items: Item name Item price $0.95 $0.75 Coke Doritos Snickers Chex Mix $0.55 $0.60 $0.90 Pepsi Maximum capacity for each item is 30. If the number of items for each of the above is less than 5 then refill it. The machine accepts quarters, dimes, and nickels, and $1 or $5 bills. There are three different containers for each coin. There should be at least 20 nickels, 20 dimes, and 20 quarters in each container. If each container has more than 100 coins then remove coins from container and leave only 20 coins. If amount of $1 bill exceed $100 then remove $1 bill and leave 20 $1 bill in the container. If amount of $5 bill exceed $300 then remove $5 bills and leave 20 $5 bills in the container The cost of the items is 35% of the sell price. Labor cost is 25% of the sell price. Overhead is 5% of the sell price. Your program must run for 6 hours per day. Your program must have at least the following functions: 1. main function 2. menu function 3. check if the machine is ON or Off 4. Turn the machine ON if it is OFF 5. refill vending machine 6. refill coins containers 7. remove coins from any one of the container if it exceeds 100 coins 8. select item from vending machine 9. accept coins 10. Check for coin validity. If it is a foreign coin then reject it 11. Check the price. If the amount received is less than the item's price then ask for more money. If the amount received is more than the item's price then return change.) 12. return change 13. calculate the sell for each item per hour 14. calculate the total sell for each item per day 15. calculate the total sell for all items 16. compute total cost of all items 17. compute labor cost 18. compute overhead 19. compute profit 20. Display
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started