Clearly Visual Basic Chapter 20 Exercise 11 Waterglen Horse Farms Solution
Each year, Sabrina Cantrell, the owner of Waterglen Horse Farms, enters four of her horses in five local horse races. She uses a table similar to the one shown in Figure 20-20 to keep track of her horse’s performances in each race. In the table, a 1 indicates that the horse won the race, a 2 indicates second place, and a 3 indicates third place. A 0 indicates that the horse did not finish in the top three places. Sabrina wants an application that displays a summary of each horse’s individual performance, as well as the performances of all the horses. For example, according to the table shown in Figure 20-20, horse 1 won one race, finished second in one race, finished third in one race, and didn’t finish in the top three in two races. Overall, Sabrina’s horses won four races, finished second in three races, finished third in three races, and didn’t finish in the top three in 10 races. Create a Visual Basic Windows application. Use the following names for the solution and project, respectively: Waterglen Solution and Waterglen Project. Save the application in the ClearlyVB2010\Chap20 folder. Change the name of the form file on your disk to frmMain.vb. If necessary, change the form’s name to frmMain. Create the interface shown in Figure 20-21. Code the application using a four-row, five-column array to store the race results. Save the solution and then start and test the application. Close the Code Editor window and then close the solution.