Section 10.9. Wrap-Up


10.9. Wrap-Up

This chapter introduced inheritancethe ability to create a class by absorbing an existing class's members and embellishing them with new capabilities. Through a series of examples using an employee inheritance hierarchy, you learned the notions of base classes and derived classes and used keyword Inherits to create derived classes that inherit members from base classes. We introduced the access modifiers Protected and Friend. Derived class methods can access Protected base class members. Friend members are accessible to classes declared in the same assembly as the class that declares the Friend members. You learned how to access base class members with MyBase and how to access the current object with the Me and MyClass references. You also saw the order in which constructors are called for objects of classes that are part of an inheritance hierarchy. Finally, you learned about the methods of class Objectthe direct or indirect base class of all classes.

In Chapter 11, Object-Oriented Programming: Polymorphism, we build on our discussion of inheritance by introducing polymorphisman object-oriented concept that enables us to write programs that handle, in a simple and more general manner, objects of a wide variety of classes related by inheritance. After studying Chapter 11, you will be familiar with classes, objects, encapsulation, inheritance and polymorphismthe most essential aspects of object-oriented programming.



Visual BasicR 2005 for Programmers. DeitelR Developer Series
Visual Basic 2005 for Programmers (2nd Edition)
ISBN: 013225140X
EAN: 2147483647
Year: 2004
Pages: 435

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