Question: 1. Complete Programming Problem #1, Distance Calculator, on page 339 of the textbook. The ADDITIONAL REQUIREMENTS described below MUST also be implemented: Assume the value
1. Complete Programming Problem #1, Distance Calculator, on page 339 of the textbook. The ADDITIONAL REQUIREMENTS described below MUST also be implemented: Assume the value of Vehicle Speed in MPH may store whole or floating-point numbers (non-monetary). Assume the value of Hours Traveled can only store whole numbers. Prevent data conversion exception for the Vehicle Speed in MPH text box by using the appropriate Try Parse method. If the data entered is invalid display an appropriate error message to the user, set the focus back to the text box causing the error, and either clear the text box or select all the data entered into it so that it can be replaced. Best practice is to validate separately from the accuracy validation (i.e., do NOT create a compound condition). Validate the input for the Vehicle Speed in MPH to make sure the data entered is greater than zero and does not exceed 180. If not, display an appropriate error message to the user, set the focus back to the text box causing the error, and either clear the text box or select all the data entered into it so that it can be replaced. Best practice is to validate separately from
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
