Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I could really use some help with this question! The program must be done in C# and must be a form application. It also must

I could really use some help with this question!

The program must be done in C# and must be a form application. It also must be easy to read, and understand as I am a beginner!

-----------------------------------------------------------------------------------------

In this exercise, youll complete a form that accepts a lunch order from the user and then calculates the order subtotal and total.

image text in transcribed

****NAMES OF THE CONTROLS: (TEXTBOX, RadioButtions, Buttons, Labels, Checkboxs)***

RADIOS

Hamburg radio button = radioHamburger

Pizza radio button = radioPizza

salad radio button = radioSalad

CHECK BUTTONS

Lettuce, tomato, onions = CheckLettuceTomatoOnion

Katchup, mustard, mayo = CheckKatchupMusterdMayo

Frech Fries = CheckFrenchFires

Labels

Subtoal = label1

Tax(7.75%) = taxLabel

Order Total = label3

TextBoxs

subtotal textbox = txtSubtotal

Tat(7.75%) textbox = txtTax

OrderTotal textbox = txtOrderTotal

Buttons

Place order = btnPlaceOrder

Exit = btnExit

The application should provide for these main courses and add-ons:

Main course Price Add-on Add-on price

Hamburger 6.95 Lettuce, tomato, and onions .75 Ketchup, mustard, and mayo French fries

Pizza 5.95 Pepperoni .50 Sausage Olives

Salad 4.95 Croutons .25 Bacon bits Bread sticks

1. Open the LunchOrderStart project in the Assignment8\EX2_LunchOrder directory.

2. Add three radio buttons to the Main Course group box, and set their properties so they appear as shown above.

The Hamburger option should be selected by default.

3. Add a group box for the add-on items. Then, add three check boxes to this group box as shown above.

None of the check boxes should be selected by default.

4. Code a method name ClearTotals that clears the three text boxes and a method named ClearAddOnsthat removes the check marks from the three check boxes.

5. Code an event handler that changes the text thats displayed for the Add-ons group box and the three check boxes when the user selects a different main course.

This event handler should also remove the check marks from the add-ons and clear the order totals. Test the application to be sure this works correctly.

6. Code an event handler that calculates and displays the subtotal, tax, and order total when the user clicks the Place Order button.

The subtotal is the cost of the main course plus the cost of the add-ons. The tax is 7.75% of the subtotal. And the order total is the subtotal plus the tax.

Test the application to be sure this works correctly.

7. Code an event handler that clears the order totals when the user checks or unchecks an add-on. Then, test the application one more time.

Suggested methods to implement are commented, but feel free to make your own.

------------------------------------------------------------------------------------------------------------------------

The code that must be modified!

namespace LunchOrder { public partial class Form1 : Form { public Form1() { InitializeComponent(); } const decimal SalesTaxPct = 0.0775m;

// private void btnPlaceOrder_Click(object sender, EventArgs e) // { //... // }

// private void MainCourse_CheckedChanged(object sender, EventArgs e) // { //... // }

// private void ClearTotals() // { //... // }

// private void ClearAddOns() // { //... // }

// private void ChangeAddOns(object sender, EventArgs e) //... // } private void btnExit_Click(object sender, EventArgs e) { this.Close(); }

} }

--------------------------------------------------------

Thanks!

Lunch Order Main course Add-on items ($.75Meach) O Hamburger $6.95 Lettuce, tomato, and onions Pizza -$5.95 Ketchup, mustard, and mayo V French fries Salad $4.95 Order total Place Order Subtotal: $8.45 Tax (.75%: $0.65 Order total: $9.10 Exit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What do you like to do with your time?

Answered: 1 week ago