Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C-Sharp University needs you to create a form that accepts a lunch order from the student and then calculates the order subtotal and total. The

C-Sharp University needs you to create a form that accepts a lunch order from the student and then calculates the order subtotal and total.

image text in transcribed

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

image text in transcribed

1. Start Visual Studio.

2. Click the Create Project hyperlink or use the File-New Project menu option.

3. In the New Project dialog box type a name for the projectname the project Lab10-SectionTime-YourLastName-YourFirstName

4. Change the forms File Name property from Form1.vb to a new name Lab10.cs

5. Change the title of the form as shown above.

6. Add labels, text boxes, and buttons to the default form and set the properties of the form and its controls so they appear as shown above. When the user presses the Esc key, the Click event of the Exit button should fire. When the user presses the Enter key, the Click event for the Place Order button should fire.

7. 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.

8. 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.

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

10. Code an event handler (this will reference the three radio button checked changed event listed on the form) 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.

image text in transcribed

Create a MainCourse CheckedChanged event that references all three radio buttons Use If Else If statements to test each radio to see if it is checked and if so the text property of each add on item will change. Example below:

image text in transcribed

Clear the Add on check boxes by calling the ClearAddOns() method and Clear the totals by calling the ClearTotals() method.

Test the application to be sure this works correctly.

11. Code the Place Order event handler that calculates and displays the subtotal, tax, and order total when the user clicks the Place Order button. Test the application to be sure this works correctly.

Use a series of If statement to test to see if each add on item check box is checked and if so accumulate the total

Use a series of If Else If statements to test to see if each Main course radio button is check and if so charge the price of the main course + (add on item amount times the price of $.75, $.50, or $.25). This is the subtotal amount.

The tax is 7.75% of the subtotal.

And the order total is the subtotal plus the tax.

12. Code an event handler called ChangeAddOns that clears the order totals when the user checks or unchecks an add-on. You will have 3 checked changed references created for the each checkbox add ons. Call the ClearTotals method you have already created. Then, test the application one more time.

Lunch Order Main course Add-on items (S.75/each) (0 Hamburger-S6.95 Pizza -$5.95 Salad -$4.95 Lettuce, tomato, and onions Ketchup, mustard, and mayo French fries Order tota Place Order Subtotal: Tax (7.75%): Order total: Egit

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

Step: 3

blur-text-image

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

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

1. Define mass and mediated communication

Answered: 1 week ago

Question

3. What changes should I be making?

Answered: 1 week ago

Question

2. Why?

Answered: 1 week ago