Clearly Visual Basic 2010 Chapter 10 Exercise 9 Carlton Solution

Availability: In stock

Regular Price: $15.00

Special Price: $12.00

OR

Clearly Visual Basic 2010 Chapter 10 Exercise 9 Carlton Solution

Double click on above image to view full picture

Zoom Out
Zoom In

More Views

Quick Overview

Clearly Visual Basic 2010 Chapter 10 Exercise 9 Carlton Solution


Carlton Industries stores the item numbers and prices of the items it sells in a sequential access file named ItemInfo.txt. The company's sales manager wants an application that displays the price corresponding to the item selected in a list box.


a. Create a Visual Basic Windows application. Use the following names for the solution, project, and form file, respectively: Carlton Solution, Carlton Project, and Main Form.vb. Create the interface shown in Figure 10-46.


b. Use Windows to copy the ItemInfo.txt file from the VB2010\Chap 10 folder to the project's bin\Debug folder. Open the Code Editor window and then open the ItemInfo.txt file contained in the project's bin\Debug folder. Each line contains an item's number followed by a comma and the price. Close the ItemInfo.txt window.


c. Define a structure named item. The structure should contain two member variables: a String variable to store the item number and a Decimal variable to store the price.


d. Declare a class-level array that contains five Item structure variables.


e. Code the form's Load event procedure so that it reads the item numbers and prices from the ItemInfo.txt file. The procedure should store the item numbers and prices in the class-level array. It also should add the item numbers to the list box.


f. When the user selects an item in the list box, the item?s price should appear in the lblPrice control. Code the appropriate procedure.


g. Save the solution and then start and test the application. Close the Code Editor window and then close the solution.

Regular Price: $15.00

Special Price: $12.00

Details

Clearly Visual Basic 2010 Chapter 10 Exercise 9 Carlton Solution

Carlton Industries stores the item numbers and prices of the items it sells in a sequential access file named ItemInfo.txt. The company's sales manager wants an application that displays the price corresponding to the item selected in a list box.

a. Create a Visual Basic Windows application. Use the following names for the solution, project, and form file, respectively: Carlton Solution, Carlton Project, and Main Form.vb. Create the interface shown in Figure 10-46.

b. Use Windows to copy the ItemInfo.txt file from the VB2010\Chap 10 folder to the project's bin\Debug folder. Open the Code Editor window and then open the ItemInfo.txt file contained in the project's bin\Debug folder. Each line contains an item's number followed by a comma and the price. Close the ItemInfo.txt window.

c. Define a structure named item. The structure should contain two member variables: a String variable to store the item number and a Decimal variable to store the price.

d. Declare a class-level array that contains five Item structure variables.

e. Code the form's Load event procedure so that it reads the item numbers and prices from the ItemInfo.txt file. The procedure should store the item numbers and prices in the class-level array. It also should add the item numbers to the list box.

f. When the user selects an item in the list box, the item?s price should appear in the lblPrice control. Code the appropriate procedure.

g. Save the solution and then start and test the application. Close the Code Editor window and then close the solution.

Product Tags

Use spaces to separate tags. Use single quotes (') for phrases.