Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In this exercise, you modify the West Coast Emporium application coded in the ch

ID: 3737196 • Letter: I

Question

In this exercise, you modify the West Coast Emporium application coded in the chapter. Use Windows to make a copy o folder. Save the copy in the ClearlyVB2012 Chap19 folder. Rename the copy Modified West Coast Solution. Open the West Coast Solution (West Coast Solution.sln) file contained in the Modified West Coast Solution folder a. Open the designer window. Change the btnNumberOfStores control's name to btnDisplay, and change its Text property to &Display.; Modify the interface so that it also displays the number of employees in the state entered by the user b. Openthe Code Editor window.Declare another class-level array to store the number of employees in each state. Use your own values to initialize the f the West Coast Solution c. Locate the btnNumberOfStores Click procedure. Change the name to btnDisplay Click and then modify the code to also display the number of d. Save the solution and then start and test the application. Close the Code Editor window and then close the solution. Here is the code Public Class frmMain class-level parallel arrays Private Sub txtState TextChanged(sender As Object, e As EventArgs) Handles txtState. TextChanged blStores.Text -String Empty End Sub Private Sub btnExit Click(sender As Object, c As EventArgs) Handles btnExit.Click Me Close0 End Sub Private Sub btnNumberOfStores Click(sender As Object, e As EventArgs) Handles btnNumberOfStores.Click searches an array for a state ID and then displays cither the number of stores from another array or 0 declare variables assign the ID to a variable search the strStates array for the ID continue searching until the ID is found or the end of the array determine whether the ID was found and display the appropriate output End Sub

Explanation / Answer

A ListBox is something which helps you display a list of the selected elements in your display sheet.

An idListBox as used in the solution is probably id.ListBox where there already exist a set of State IDs and using the code in the solution, you are adding a couple of more State IDs in the already present ListBox on your "id" sheet.

So, either using the name of the sheet you are operating on or separating the "id" with the "ListBox" with a dot "." separator (like - id.ListBox) would fix the above code for you.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote