
Basic implementation of an object-based schema by Trent Jackson. As many Java or C++ programmers will undoubtedly know -- OOP (object orientated programming) results in clean, reusable code that is far easier to maintain than procedural methods. Unfortunately, however though -- VB isn't an OOP language, but it does come close in a round about way. VB supports classes with ability to create any instance of a class, assign instance variables and create accessor & mutator methods. However there is no provision for inheritance or polymorphism, so technically speaking, despite what some believe – classic VB isn't a true OOP language. Polymorphism is a powerful mechanism that allows objects to be processed differently according to their type / class. Inheritance is as equally a desirable trait to have since it allows classes to be extended with other classes. There are still enormous benefits in using classes in VB over traditional procedural programming. In this example here you will see just how simple it is to adopt an object-based way of programming. The example also illustrates how to avoid using fixed arrays by resorting to a dynamic structure, which grows and shrinks in size to suit the amount of data being used, identical behavior to the vector structure in Java. Only a 5 KB download.
Download
Thursday, March 13, 2008
Object-Based Programming Example
SaintCode Thursday, March 13, 2008
Label: Visual Basic
Subscribe to:
Post Comments (RSS)

0 Responses:
Post a Comment