Question: Programming: Submit Order Button Use Try/Catch blocks when converting user input (textboxes) into your numeric variables If a user input fails a conversion, in the
Programming:
- Submit Order Button
- Use Try/Catch blocks when converting user input (textboxes) into your numeric variables
- If a user input fails a conversion, in the catch portion have a message box display saying which input field was in error and how they should fix it then return focus to that field.
-
- If all inputs convert successfully then proceed with the calculations:
- Calculate the subtotal.
- Java is $25 per cup
- Mocha is $95 per cup
- Latte is $2.75 per cup
- Frappe is $3.25 per cup
- Calculate the tax
- Tax rate is 9%
- Calculate Order Total = Subtotal + tax
- Calculate the subtotal.
- Display values in corresponding order total text boxes. All values should display in currency format.
- Display a message to the user in the message textbox above the buttons that says Thank you (customer name from text box) for you order. (see GUI design for example)
- Change the color of the message box text to magenta
- If all inputs convert successfully then proceed with the calculations:
- Clear Button
- Clear all textboxes on the form
- Set focus to customer name text box
- Exit Button
- Close form
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
