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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Illustrations XXIII<br />

9.6 CCircle class contains an x-y coordinate and a radius. 358<br />

9.7 modCircleTest demonstrates class CCircle functionality. 360<br />

9.8 CCircle2 class that inherits from class CPoint. 362<br />

9.9 CPoint2 class represents an x-y coordinate pair as Protected data. 364<br />

9.10 CCircle3 class that inherits from class CPoint2. 365<br />

9.11 modCircleTest3 demonstrates class CCircle3 functionality. 367<br />

9.12 CCircle4 class that inherits from class CPoint, which does not<br />

provide Protected data. 369<br />

9.13 modCircleTest4 demonstrates class CCircle4 functionality. 371<br />

9.14 CCylinder class inherits from class CCircle4 and Overrides<br />

method Area. 373<br />

9.15 Testing class CCylinder. 375<br />

9.16 CPoint3 base class contains construc<strong>to</strong>rs and finalizer. 378<br />

9.17 CCircle5 class inherits from class CPoint3 and overrides a<br />

finalizer method. 379<br />

9.18 Demonstrating order in which construc<strong>to</strong>rs and finalizers are called. 381<br />

10 Object-Oriented <strong>Program</strong>ming: Polymorphism<br />

10.1 CPoint class represents an x-y coordinate pair. 390<br />

10.2 CCircle class that inherits from class CPoint. 391<br />

10.3 Assigning derived-class references <strong>to</strong> base-class references. 393<br />

10.4 Abstract CShape base class. 400<br />

10.5 CPoint2 class inherits from MustInherit class CShape. 401<br />

10.6 CCircle2 class that inherits from class CPoint2. 403<br />

10.7 CCylinder2 class inherits from class CCircle2. 404<br />

10.8 CTest2 demonstrates polymorphism in Point-Circle-Cylinder hierarchy. 406<br />

10.9 MustInherit class CEmployee definition. 410<br />

10.10 CBoss class inherits from class CEmployee. 411<br />

10.11 CCommissionWorker class inherits from class CEmployee. 412<br />

10.12 CPieceWorker class inherits from class CEmployee. 414<br />

10.13 CHourlyWorker class inherits from class CEmployee. 416<br />

10.14 CTest class tests the CEmployee class hierarchy. 417<br />

10.15 Interface for returning age of objects of disparate classes. 420<br />

10.16 CPerson class implements IAge interface. 421<br />

10.17 CTree class implements IAge interface. 422<br />

10.18 Demonstrate polymorphism on objects of disparate classes. 423<br />

10.19 IShape interface provides methods Area and Volume and<br />

property Name. 426<br />

10.20 CPoint3 class implements interface IShape. 426<br />

10.21 CCircle3 class inherits from class CPoint3. 427<br />

10.22 CCylinder3 class inherits from class CCircle3. 429<br />

10.23 CTest3 uses interfaces <strong>to</strong> demonstrate polymorphism in<br />

Point-Circle-Cylinder hierarchy. 431<br />

10.24 Bubble sort using delegates. 433<br />

10.25 Bubble-sort Form application. 435

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

Saved successfully!

Ooh no, something went wrong!