Visual Basic and OOP: The Next Generation
- Visual Basic and OOP: The Next Generation
- Inheritance
- Polymorphism using Overloading
- Polymorphism using Overriding
- Parameterized Constructors
- Structure Exception Handling
- Conclusion
No matter how hard our friends in Redmond try, when it comes to placing all the features of Object Oriented Programming (OOP) at our disposal, Visual Basic always seems to fall just short of the mark. Now, don’t get me wrong—I am a devoted VB Developer, and I have been for awhile. In fact, I’ve been feeding the kids while writing VB code since Version 1.0. However, several OOP features that Java/C++ developers have enjoyed for years are not presently available in Visual Basic. Were these features to appear in the next version of VB, I would get so excited that I wouldn’t even be able to sit down. Well, if things turn out as planned, the next version of VB is going to have me standing for a long, long while; the word on the street is that VB 7 is finally going to get the OOP thing right!
In this article, I will describe some of the OOP enhancements that are planned for the next release of Visual Basic. In addition, I am going to put a little twist on things. Rather than going over the laundry list of new features, I will show you how these new features pertain to standard Object Oriented Programming practice. Therefore, as I show OOP enhancements in VB 7, I’ll show how these new features are already in place in VB’s archrival Java.
In this article, I will assume that you understand the meaning of the terms property and method. I addition, I will assume that you have been working with class modules in Visual Basic, and that you have a fundamental understanding of encapsulation using the Private and Public keywords in the Visual Basic language. Finally, please note that I am supplying some of the source code for the Visual Basic and Java examples that I created for this article. Download the code