Question: Write a C# program that computes the cost of cookies at Hurleys Bakery. The cost, of course, depends on the number of cookies you purchase.
Write a C# program that computes the cost of cookies at Hurleys Bakery. The cost, of course, depends on the number of cookies you purchase. The following table gives the break down: Cookies Purchased / Cost per Cookie ($) <= 3 / 2.00 < 9 / 1.75 <= 15 / 1.50 > 15 / 1.00 A customer can save on the HST (13%) if they buy 12 or more cookies so only charge HST (use a constant) on the purchase if the customer purchases less than 12 cookies. There is also a cover charge for the luxury of purchasing one of Hurleys famous cookies. The constant cover charge is a flat $0.25 (before HST) which is added to the total irrespective of the number of cookies purchased (the cover charge should be a constant). The program should input the Customers Last Name (string), and the number of donuts purchased (int). The program should output (in a neat manner): Last Name, Number of Cookies Purchased, and Total Cost. The program should also validate the users input: if the user enters 0 or a negative number, an error message should be printed indicating that at least one cookie needs to be ordered. Notes: You can assume that the user will enter an integer value when prompted for the number of cookies purchased (you only need to check that the value is greater than 0). Also, no looping is required.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
