Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project: Vending Machine 9 Write a C++ menu driven program to simulate a vending machine using functions. The vending machine has the folowing items name

image text in transcribed
image text in transcribed
Project: Vending Machine 9 Write a C++ menu driven program to simulate a vending machine using functions. The vending machine has the folowing items name tem price $0.75 $0.55 0.60 s0.90 Snickers Chex Mix Maxdimum capacity for each item is 30 If the number of items for each of the above is less than 5, then retl it. The machine accepts quarters, dimes, and nickels, and $1 or $5 bills. There are three dittferent containers for each cotn. There should be at least 20 rickels, 20 dimes, and 20 quarters in each container. If each container has more than 100 colrs, then remove colps from container and leave only 20 cains. If amount of $1 bills exceeds $100, then remove the $1 bils and leave twenty $1 bills in the container. If amount of $5 bils exceed $300, then remove $5 bills and leave twenty $5 bills in the container The cost of the items is 35% ofthe selling price. Labor cost 25% ofthe selang price. Overhead is 5% ofthe selling price. Your program must run for six hours per day. Your program must have at least the following tunctions 1. Matn function 2. Menu function 3. Check if the machine is ON or Otf 4. Turn the machine ON if it is OFF 5. Refill vending machine 6. Retil cotns contalners 7. Remove coins from any one of the contalner if it exceeds 100 colns 8 Select item from vending machine 9. Accept colns 10. Check for coin validity. U it is a foreign cotn, then reject it 11. Check the price. If the amount recelived is less than the item's price, then ask for more money. I the amount received is more than the item's price, then return change 12. Return change 13. Calculate the sales for each item per hour

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL 10 High Performance Expert Techniques For Query Optimization High Availability And Efficient Database Maintenance

Authors: Ibrar Ahmed ,Gregory Smith ,Enrico Pirozzi

3rd Edition

1788474481, 978-1788474481

More Books

Students also viewed these Databases questions

Question

=+1. Have you used powerful language in your message?

Answered: 1 week ago

Question

Explain in detail the different methods of performance appraisal .

Answered: 1 week ago

Question

6. Explain the power of labels.

Answered: 1 week ago

Question

10. Discuss the complexities of language policies.

Answered: 1 week ago