Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming: C# Calculate Order Amount Button Use an IF condition to check if the customer name has been entered (not empty). If the customer name

image text in transcribed

Programming: C#

  1. Calculate Order Amount Button
    1. Use an IF condition to check if the customer name has been entered (not empty). If the customer name is empty then display a message to the user in a message box Must enter a Customer Name before placing an order. and set focus to the Customer Name text box. If a name has been entereed, continue with the processing below.
    2. Clear Message Text Box
    3. Test the quantity entered in the quantity textbox to make sure it is numeric (use TryParse). If it isnt numeric display a message box with the message Please enter a numeric quantity and set focus to the Quantity textbox.
    4. Make sure that a drink type has been selected in the list box. If there is a selection, save the selection to a variable, if a drink hasnt been selected set the variable = .
    5. Calculate Order Amount based on the size selected and quantity entered (use nested if).
      1. Small = $2.00
      2. Medium = $3.00
      3. Large = $4.00
    6. Calculate Discount (use nested if)
      1. Employee and more than 2 ordered = 10% discount (use logical operator)
      2. Employee and 2 or less ordered = 8% discount
      3. Non-Employee and more than 4 ordered = 5% discount
    7. Calculate Total = Order Amount Discount
    8. Display Order Amount, Discount, Total in currency format in textboxes.
    9. Display a message to the user in the message box using a SWITCH structure.
      1. You can use any message you want, but you need to have a different message for 0 ordered, 1 ordered, 2 ordered, 3 or more are ordered.
    1. In the message you should include the customer name and drink type (see GUI design for an example message and drink/customer name)
  1. New Customer Button
    1. Clear all textboxes on the form
    2. Small radio buttons should be checked
    3. Nothing should be selected in the Drink Type list box
    4. Employee check box should be unchecked
    5. Set focus to Quantity text box
  2. Exit Button
    1. Close form
  3. All methods must have comments explaining what is done in that method.
X Michelle Parker Size: Drink Type: Brewed Cappucino Latte Small Medium O Large Quantity 2 Customer Name: Michelle Employee? Order Total: Order Amount: $6.00 Calculate Order Amount Discount: $0.48 Total: $5.52 The more Cappucino you order the better Michelle! New Customer Est

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

DNA Databases

Authors: Stefan Kiesbye

1st Edition

0737758910, 978-0737758917

More Books

Students also viewed these Databases questions

Question

8. Explain the relationship between communication and context.

Answered: 1 week ago

Question

Which are non projected Teaching aids in advance learning system?

Answered: 1 week ago

Question

Exposure to SQL desirable but not required

Answered: 1 week ago

Question

Strong analytical, communication, and problem-solving skills

Answered: 1 week ago