Tutorial 8
Tutorial 8: Example Use of a twodimensional Array (taken fromProgramming in Visual Basic .NET, by Bradley and Millspaugh) 1) You are going to create a project that looks up the driving distance between two cities. Use two dropdown lists that contain the names of the cities as indicated in the table below. Label one list “Departure” and the other “Destination. Use a button click event to calculate the distance. Use a two dimensional array to store the distances. 2) Your GUI will look as follows: 3) Table of driving distances follows: Boston Chicago Dallas Las Los Miami New Tor Van D.C Vegas Angeles Orleans onto cover Boston 0 1004 1753 2752 3017 1520 1507 609 3155 448 Chicago 1004 0 921 1780 2048 1397 919 515 2176 709 Dallas 1753 921 0 1230 1399 1343 517 1435 2234 1307 Las 2752 1780 1230 0 272 2570 1732 2251 1322 2420 Vegas Los 3017 2048 1399 272 0 2716 1858 2523 1278 2646 Angeles Miami 1520 1397 1343 2570 2716 0 860 1494 3447 1057 New 1507 919 517 1732 1858 860 0 1307 2734 1099Orleans Tor 609 515 1435 2251 2523 1494 1307 0 2820 571 onto Van 3155 2176 2234 1322 1278 3447 2734 2820 0 2887 cover D.C. 448 709 1307 2420 2646 1057 1099 571 2887 0 4) Properties Plan: Properties Plan for Tutorial 8 Object Property Setting Form1 Name Form1 Text Driving Distance AcceptButton btnLookUp Label1 Text Departure: Label2 Text ...