Clearly Visual Basic Chapter 17 Exercise 10 Doughnut Shoppe Solution
The Doughnut Shoppe sells four varieties of doughnuts: Glazed ($.65), Sugar ($.65), Chocolate ($.85), and Filled ($1.00). It also sells regular coffee ($1.80) and cappuccino ($2.50). The store manager wants an application that she can use to calculate and display a customer’s subtotal, 3% sales tax, and total due.
a. Create a Visual Basic Windows application. Use the following names for the solution and project, respectively: Doughnut Shoppe Solution and Doughnut Shoppe Project. Save the application in the ClearlyVB2010\Chap17 folder. Change the name of the form file on your disk to frmMain.vb. If necessary, change the form’s name to frmMain.
b. Create the interface shown in Figure 17-16.
c. Code the application. Use one function to calculate and return the cost of the doughnut. Use another function to calculate and return the cost of the coffee. Use a third function to calculate and return the 3% sales tax. Use a Sub procedure to clear the subtotal, sales tax, and total due amounts when a radio button is clicked.
d. Save the solution and then start and test the application. Close the Code Editor window and then close the solution.
There are no reviews yet.