Question: Create an application that lets the user enter a 10-character telephone number in the format XXX-XXX-XXXX. The application should display the telephone number with any
Create an application that lets the user enter a 10-character telephone number in the format XXX-XXX-XXXX. The application should display the telephone number with any alphabetic characters that appeared in the original translated to their numeric equivalent. For example, if the user enters 555-GET-FOOD, the application should display 555-438-3663.\ Create a CheckChars method to check that text entered is a letter or number or a dash '-'. This method should be used to check that all the characters in the textbox is valid. (10 points)\ Create a textbox validating method that calls the CheckChars method to loop through all the characters in the textbox string for valid characters. If error, provide an error message (either through error provider or messagebox), highlight the text in the textbox and do not proceed further. If the data entered is valid, enable the Translate button. (12 points)\ Translate button - Map the alphabetic characters to numbers. Given that the format is XXX-XXX-XXXX, you have to make sure that the 4th and 8th characters are '-' and set those in the new string. You will probably want to use a loop to go through each character and concatenate the characters to form the new string. You can use a if else if or switch statement to map the alphabets to the appropriate number. (18 points)\ Reset button - Reset the form with a messagebox confirmation. Clear the input and output; disable the Translate button; set the cursor at the textbox. (5 points)\ Exit button - Exit the application. (1 point)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
