subject

The machine should dispense ANY types of cheese, in half-pound packages. Your program will STILL do the following: A. List all the cheese types available and the prices B. Asks the user how many pounds of each type of cheese to purchase in 0.5 lb increments. C. Calculate Original Sub Total (price*amount of each cheese added together) D. Calculate discounts based on how many pounds for Humboldt Fog and Red Hawk cheeses the user entered, as well as the total purchase amount o See Discount Calculation below for details E. Ask the user if they would like to see a list of what they purchased o If yes, a list comes up showing how much of each type of cheese they bought and the cost of each cheese. Display only the cheese they actually bought o If no items are purchased, then display a message stating the same (see Sample Run 4) o If the user answers no, then no itemized information is displayed F. Display Original Sub Total, Specials and New Sub Total, Additional Discount and Final Total as shown in the Sample Runs below (see Discount Calculation below to see how these are calculated). Note, you must use printf to format your output [cf. Section 9.3 in zyBooks]. For instance, you will use the following print statement to print costs of individual items in your itemized list: System. out. printf("%.1f lb of %s @ $%.2f = $%.2f\n", amounts[i], names[i], prices[i], prices[i]*amounts[i]);

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:30
At an open or uncontrolled intersection, yield if a. your road is paved and the crossroad is not b. the cross road is paved and yours is not c. you have two or more passengers in your vehicle d. you did not yield in the last intersection
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
What is the worst-case complexity of the maxrepeats function? assume that the longest string in the names array is at most 25 characters wide (i.e., string comparison can be treated as o( class namecounter { private: int* counts; int nc; string* names; int nn; public: namecounter (int ncounts, int nnames); int maxrepeats() const; }; int namecounter: : maxrepeats () { int maxcount = 0; for (int i = 0; i < nc; ++i) { int count = 1; for (int j = i+1; j < nc; ++j) { if (names[i] == names[j]) ++count; } maxcount = max(count, maxcount); } return maxcount; }
Answers: 3
question
Computers and Technology, 23.06.2019 10:50
The volume v and paper surface area a of a conical paper cup are given by where r is the radius of the base of the cone and h is the height of the cone. a. by eliminating h, obtain the expression for a as a function of r and v. b. create a user-de ned function that accepts r as the only argument and computes a for a given value of v. declare v to be global within the function. c. for v ! 10 in.3 , use the function with the fminbnd function to compute the value of r that minimizes the area a. what is the corresponding value of the height h? investigate the sensitivity of the solution by plotting v versus r. how much can r vary about its optimal value before the area increases 10 percent above its minimum value?
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
How is a wan different than a lan? both connect computers, but only wan users don’t need the same operating system. both are peer-to-peer networks, but only a wan requires networking hardware. both network computers, but only a wan can cover larger geographical ranges. both connect computers to the internet, but only wan connects to the cloud.
Answers: 1
You know the right answer?
The machine should dispense ANY types of cheese, in half-pound packages. Your program will STILL do...
Questions
question
English, 03.08.2019 17:30
Questions on the website: 13722359