subject

The vending machine sells three types of food: 1) Potato chips $1.25; 2) Cookies $0.85; 3) Candies $0.95. The program will prompt for the buyer to enter the amount in quarters (25 cents), dimes (10 cents), and nickels (5 cents). The program will then present a selection menu for the foods. The buyer makes a selection. If the buyer selects a food that is sold out, the program will display a message and redisplay the selection menu. If the buyer has put in enough money, the selected food will be dispensed, with a message "Please take a your (food)". If the amount is more than the cost, an appropriate amount of change (in quarter, dime or nickel) will be dispensed. Every food is initialized with a quantity. The quantity is reduced by one every time the food is dispensed. When the quantity of a food is 0, no more should be sold, with an error stating "Sold out. Please make another choice". Note: 1 dollar = 4 quarters = 10 dimes = 20 nickels 1 dollar = 100 cents 1 quarter = 25 cents 1 dime = 10 cents 1 nickel = 5 cents

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:00
Assume that you have an array of integers named a. which of these code segments print the same results? int i = 1; while(i < a.length) { system.out.println(a[i]); i++; } int i; for (i = 0; i < a.length; i++) { system.out.println(a[i]); } for (int i : a) { system.out.println(i); } i and ii only ii and iii only i and iii only all three print the same results. all three print different results.
Answers: 3
question
Computers and Technology, 22.06.2019 22:00
Perform the following tasks: a. create a class named testclass that holds a single private integer field and a public constructor. the only statement in the constructor is one that displays the message “constructing”. write a main()function that instantiates one object of the testclass. save the file as testclass.cpp in the chapter 08 folder. run the program and observe the results. b. write another main()function that instantiates an array of 10 testclass objects. save the file as test class array.c . run this program and observe the results.
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Select all that apply. which of the following are proofreading options included in microsoft word? spell check find replace grammar check formatting check
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What key should you press and hold to select and open multiple files at one time? enter alt control esc
Answers: 1
You know the right answer?
The vending machine sells three types of food: 1) Potato chips $1.25; 2) Cookies $0.85; 3) Candies $...
Questions
question
Mathematics, 22.05.2020 11:59
question
Mathematics, 22.05.2020 11:59
Questions on the website: 13722363