Question: Need to use: Windows Forms App (NET Framework) Visual C# Exercise 3-1 Create a n reate a new form named Exercise 3.1 within the project
Need to use:



Windows Forms App (NET Framework) Visual C# Exercise 3-1 Create a n reate a new form named Exercise 3.1 within the project Ch3_DecisionAndValidatio own below, so that it computes discount percent based on the discount cod nt (if there is no discount, the user wouldn't enter any discount code controls and the code f form as shown below rom the form IceCream TotalDiscounted to the new form Exero Copy h not based 2:" otherwise, there discount code is also using a and 10% discount if discount code is scount code). The di entered into a TextBox as shown below. Compute the discount using an if statemenount Codee e switch statement. subtotal: 20% discount ifdiscount code is "1 s no discou be entered into a Text statement anda code TextBoxes. The unit price must be a valid number; the number of scoops must be an user enters a discount code, it must be a "I" or "2." When the user clicks the compute button, the program should validate the data entered into th integer, and if the er to the truncated number, s Hint: To check whether a number is an integer, you may compare the number to the t in if (scoops (int)scoops) or, if (scoops Math.Truncate(scoops)) Class Exercise 3-1 Sub Total: Diacount: Net Coat: $7.50 $1.50 $6.00 3 #of Scoops: Unt Price Discourt Code: :2.5 1 Sal 8 Tax : Total Coat: $0.33 $6.33 Compute Total Clear Ext Windows Forms App (NET Framework) Visual C# Exercise 3-1 Create a n reate a new form named Exercise 3.1 within the project Ch3_DecisionAndValidatio own below, so that it computes discount percent based on the discount cod nt (if there is no discount, the user wouldn't enter any discount code controls and the code f form as shown below rom the form IceCream TotalDiscounted to the new form Exero Copy h not based 2:" otherwise, there discount code is also using a and 10% discount if discount code is scount code). The di entered into a TextBox as shown below. Compute the discount using an if statemenount Codee e switch statement. subtotal: 20% discount ifdiscount code is "1 s no discou be entered into a Text statement anda code TextBoxes. The unit price must be a valid number; the number of scoops must be an user enters a discount code, it must be a "I" or "2." When the user clicks the compute button, the program should validate the data entered into th integer, and if the er to the truncated number, s Hint: To check whether a number is an integer, you may compare the number to the t in if (scoops (int)scoops) or, if (scoops Math.Truncate(scoops)) Class Exercise 3-1 Sub Total: Diacount: Net Coat: $7.50 $1.50 $6.00 3 #of Scoops: Unt Price Discourt Code: :2.5 1 Sal 8 Tax : Total Coat: $0.33 $6.33 Compute Total Clear Ext
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
