Chapter 18. Polymorphism


You will learn the following in this chapter:

  • What polymorphism is and how it relates to object-oriented programming

  • How polymorphism and inheritance work together to simplify programming tasks

  • How to use constructors properly

  • How to use virtual classes

  • How to design an interface

Recall from Chapter 2, "The Basics of Object-Oriented Programming," that the three basic building blocks of object-oriented programming (OOP) are encapsulation, inheritance, and polymorphism. This chapter examines the third component of the OOP trilogy: polymorphism. You will learn what polymorphism is and how to take advantage of it in your programs. By the end of this chapter you will know how to use polymorphism to increase the flexibility of classes, reduce the amount of code required for a given program, and make programs easier to debug and maintain. This chapter ends by showing you how interfaces relate to polymorphism and OOP in general.



Visual Basic .NET. Primer Plus
Visual Basic .NET Primer Plus
ISBN: 0672324857
EAN: 2147483647
Year: 2003
Pages: 238
Authors: Jack Purdum

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net