30.07.2013 Views

Visual Basic.NET How to Program (PDF)

Visual Basic.NET How to Program (PDF)

Visual Basic.NET How to Program (PDF)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

XXII Illustrations<br />

7.6 <strong>Program</strong> that prints his<strong>to</strong>grams. 256<br />

7.7 Using arrays <strong>to</strong> eliminate a Select Case structure. 257<br />

7.8 Passing arrays and individual array elements <strong>to</strong> procedures. 261<br />

7.9 Passing an array reference with ByVal and ByRef. 265<br />

7.10 BubbleSort procedure in modBubbleSort. 268<br />

7.11 Sorting an array with bubble sort. 269<br />

7.12 Procedures for performing a linear search. 272<br />

7.13 Linear search of an array. 273<br />

7.14 Binary search of a sorted array. 276<br />

7.15 Two-dimensional array with three rows and four columns. 280<br />

7.16 Initializing multidimensional arrays. 281<br />

7.17 Using jagged two-dimensional arrays. 283<br />

7.18 Creating variable-length parameter lists. 287<br />

7.19 Using For Each/Next with an array. 288<br />

8 Object-Based <strong>Program</strong>ming<br />

8.1 Abstract data type representing time in 24-hour format. 299<br />

8.2 Using an abstract data type. 303<br />

8.3 Attempting <strong>to</strong> access restricted class members results in a syntax error. 307<br />

8.4 Overloading construc<strong>to</strong>rs. 309<br />

8.5 Overloaded-construc<strong>to</strong>r demonstration. 312<br />

8.6 Properties in a class. 314<br />

8.7 Graphical user interface for class CTime3. 318<br />

8.8 CDay class encapsulates day, month and year information. 321<br />

8.9 CEmployee class encapsulates employee name, birthday and hire date. 323<br />

8.10 Composition demonstration. 324<br />

8.11 Class using Me reference. 325<br />

8.12 Me reference demonstration. 326<br />

8.13 CEmployee2 class objects share Shared variable. 328<br />

8.14 Shared class member demonstration. 330<br />

8.15 Constants used in class CCircleConstants. 332<br />

8.16 Const and ReadOnly class member demonstration. 333<br />

8.17 CEmployee3 class <strong>to</strong> s<strong>to</strong>re in class library. 336<br />

8.18 Simple class library project. 338<br />

8.19 Module modAssemblyTest references EmployeeLibrary.dll. 339<br />

8.20 Class View of Fig. 8.1 and Fig. 8.2. 341<br />

8.21 Invoking the Object Browser from the development environment. 342<br />

8.22 Object Browser when user selects Object from development<br />

environment. 343<br />

9 Object-Oriented <strong>Program</strong>ming: Inheritance<br />

9.1 Inheritance examples. 352<br />

9.2 Inheritance hierarchy for university CCommunityMembers. 353<br />

9.3 Portion of a CShape class hierarchy. 354<br />

9.4 CPoint class represents an x-y coordinate pair. 355<br />

9.5 modPointTest demonstrates class CPoint functionality. 357

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!