Question: Using Windows Software Lab Document Here: Now you will complete this same project, but now you will rebuild it using the Case - Switch condition

Using Windows Software
Lab Document Here:
Now you will complete this same project, but now you will rebuild it using the Case-Switch condition framework.
```
switch (subtotal)// This is also correct.
{// This first statement is your hint for 4.4 and WILL work
case decimal stotal when subtotal >=500:
discountPct =.2m;
break;
case based on the Second condition:
State the discount percentage.
break;
case based on the Second condition:
State the discount percentage.
break;
default:
discountPct =.0m;
lblRedNotice.Text ="100 or above Only";
break;
}
```
Remember also to comment out your previous If-Else-If from the prior program similar to the below in green.
```
//// Conditions
//if (subtotal >=500)
//{
// discountPct =.2m;
//}
//else if (subtotal >=250 && subtotal 500)
//{
// discountPct =.15m;
//}
//else if (subtotal >=100 && subtotal 250)
//{
// discountPct =.1m;
//}
//// Peform Calculations
//decimal discountAmt = subtotal * discountPct;
//decimal invoiceTotal = subtotal - discountAmt;
//// Display in the Boxes
//txtDiscountPct.Text = discountPct.ToString("p1");
//txtDiscountAmt.Text = discountAmt.ToString("c");
//txtTotal.Text = invoiceTotal.ToString("c");
//txtSubTotal.Focus();
```
Using Windows Software Lab Document Here: Now you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!