Open the FigureThisOut Solution (FigureThisOut Solution.sln) file contained in the ClearlyVB2012Chap18FigureThisOut Solution folder.
a. Open the Code Editor window and study the existing code. Start the application. Click the Find a Letter button. Type the letter a and then press Enter. The btnFind_Click procedure displays the “A is in array element 0†message. Test the application using the letters b, c, and d. The procedure displays the “B is in array element 1â€, “C is in array element 2â€, and “D is not in the array†messages. Stop the application.
b. Change the Do clause to Do Until strLetters(intSub) = strSearchFor OrElse intSub = strLetters.Length. Save the solution and then start the application. Click the Find a Letter button. Type the letter a and then press Enter. The btnFind_Click procedure displays the “A is in array element 0†message. Test the application using the letters b and c. The procedure displays the “B is in array element 1†and “C is in array element 2†messages.
c. Click the Find a Letter button. Type letter d and then press Enter. A run time error occurs. Read the error message. Click DEBUG on the menu bar and then click Stop Debugging. Why did the modified Do clause produce a run time error?
d. Change the Do clause to Do Until intSub = strLetters.Length OrElse strLetters(intSub) = strSearchFor. Save the solution and then start and test the application to verify that it is working correctly. Close the Code Editor window and then close the solution.
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
