Question: Hurleys Bakery is famous for its mini pies. Write a C# program that computes a the cost of purchasing mini pies at Hurleys Bakery. The
Hurleys Bakery is famous for its mini pies. Write a C# program that computes a the cost of purchasing mini pies at Hurleys Bakery. The cost, of course, depends on the number of mini pies you buy. The following table gives the break down: Mini Pies Purchased Cost per Mini Pie ($) 1 4.00 = 8 3.00 A customer can save also on the HST (13%) if they buy 12 or more min pies so only charge HST (use a constant) on the purchase if the customer purchases less than 12 mini pies. There is also a cover charge for the luxury of purchasing one of Hurleys famous min pies. The cover charge (which is constant) is $0.50 (before HST) which is added to the total irrespective of the number of mini pies purchased. The program should input the Customers Last Name (string), and the number of mini pies purchased (int). The program should output (in a neat manner with properly formatted currency): Last Name, Number of Mini Pies Purchased, and Total Cost. The program should also validate the users input: if the user enters 0 (or fewer), an error message should be printed indicating that at least one mini pie needs to be ordered. If the input is in error, the program should not output a cost but terminate gracefully (do NOT use the Exit statement). Notes: You can assume that the user will enter an integer value when prompted for the number of mini pies purchcased (you only need to check that the value is greater than 0). Also, no looping is required on Assignment 1. For this assignment, you are to submit: 1. Properly documented source code (.cs file) which includes comments at the top of your program (containing your name, student number, a description of the program), the list of variable names with their uses (data dictionary), and comments within the body of your program (inline comments). 2. Sample output showing your program works: use the Testing Documemntation Template provided in the Assignments folder on BlackBoard. You are to submit a PDF file that contains at least one screen shot of an output window, and several more cut and pastes of sample outputs (use a word processor and then export as a PDF). Please note that one sample output does NOT demonstrate that your program works. Your job is to prove to the marker that your program works for all cases. For this assignment, six (6) test cases must be included: zero or a negative number of mini pies, 1 mini pie, between 2 and 4 mini pies, between 5 and 7 mini pies, between 8 and 11 mini pies, and greater than 12 mini pies. Failure to used the testing documentation template and/or to submit as a PDF could result in a 0 for the testing component of the assignment. y the due date.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
