If you check both Regular and Cheese Menu Burgers Fries Drinks Choices for Burgers Regular (4.19) w/Cheese (4.79) w/ Bacon (4.79) w Bacon and Cheese (5.39) Compute Cost of Meal Total Quantity 1 2 Tax If you want to cancel Regular, you can uncheck Regular and quantity will be cleared automatically. Menu Choices for Burgers х Burgers Fries Drinks Regular (4.19) w/Cheese (4.79) w/ Bacon (4.79) w Bacon and Cheese (5.39) Quantity 2 Compute Cost of Meal Tax Total If you click on the Compute Button, Calculate Cost of Meal, Tax, and Total • Tax is 9% of the Cost of Meal. • Total is the Cost of Meal Plus the Tax. Burgers Menu Choices for Burgers Regular (4.19) w/Cheese (4.79) Quantity w/ Bacon (4.79) 2 w Bacon and Cheese (5.39) 1 Choice for Fries Fries Quantity Small (2.39) 1 Medium (3.09) 2 Drinks Large (4.99) Choice for Drinks Soda (1.69) Bottled Water (1.49) Quantity 2 Compute Cost of Meal $26.52 Tax $2.39 Total $28.91
Hello! I need your help. Got a lab which is not getting solved. I have a task to make a windows form app using C# for ordering fast food. I got the whole thing working except the part where the custumer can choose the quantity. Attaching bellow what professor is looking for and parts of my code to explain what I have done.
// Getting the order and quantity (where I messed up most likely)
// chkBurger - check box for burger option | txtRegQuant - text box for input
double price = 0.0;
double total = 0.0;
if (chkBurger.Checked)
{
if (chkRegular.Checked)
{
int regQuant = int.Parse(txtRegQuant.Text);
if (regQuant >= 0)
{
price = 4.19 + price;
total = price * regQuant;
}
}
// Final calculation & Output
double taxes = total * 0.09;
double totalTax = total + taxes;
txtTotal.Text = "$" + Convert.ToString(Math.Round(totalTax, 2));
txtCost.Text = "$" + Convert.ToString(Math.Round(total, 2));
txtTax.Text = "$" + Convert.ToString(Math.Round(taxes,2));
![If you check both Regular and Cheese
Menu
Burgers
Fries
Drinks
Choices for Burgers
Regular (4.19)
w/Cheese (4.79)
w/ Bacon (4.79)
w Bacon and Cheese (5.39)
Compute
Cost of Meal
Total
Quantity
1
2
Tax
If you want to cancel Regular, you can uncheck Regular and quantity will be cleared automatically.
Menu
Choices for Burgers
х
Burgers
Fries
Drinks
Regular (4.19)
w/Cheese (4.79)
w/ Bacon (4.79)
w Bacon and Cheese (5.39)
Quantity
2
Compute
Cost of Meal
Tax
Total](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Ff41b2035-e0d7-407a-809b-3aed6cab04b8%2F45e4a1e1-c398-450e-8b54-cf04fcc03c45%2Fqdn84y4_processed.png&w=3840&q=75)
![If you click on the Compute Button, Calculate Cost of Meal, Tax, and Total
•
Tax is 9% of the Cost of Meal.
•
Total is the Cost of Meal Plus the Tax.
Burgers
Menu
Choices for Burgers
Regular (4.19)
w/Cheese (4.79)
Quantity
w/ Bacon (4.79)
2
w Bacon and Cheese (5.39)
1
Choice for Fries
Fries
Quantity
Small (2.39)
1
Medium (3.09)
2
Drinks
Large (4.99)
Choice for Drinks
Soda (1.69)
Bottled Water (1.49)
Quantity
2
Compute
Cost of Meal
$26.52
Tax $2.39
Total
$28.91](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Ff41b2035-e0d7-407a-809b-3aed6cab04b8%2F45e4a1e1-c398-450e-8b54-cf04fcc03c45%2Fjuzthwm_processed.png&w=3840&q=75)
Unlock instant AI solutions
Tap the button
to generate a solution
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)