98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsPrevious article Next article VBA articles
OOPS Visual Basic Did It Again
Sat 27th June 2009
Visual Basic.NET improves on this efficiency still further because it is a completely object-oriented program (OOP), meaning that it focuses on the data itself rather than the specific function of a module. This allows much more 'behavioural' interaction between different objects and enables them to perform individual tasks. Think of it like an office where every employee has a specific job and function yet can relay messages to one another or delegate where necessary.
There is a particular set of terms for object oriented programs and these emphasise its
'human-ness,' as they are terms that we use in normal conversation when identifying things and their purposes.
Class is the fundamental building block of an OOP reducing an object to its most basic level. Within each class there are a number of more specific objects, so for example DAVID BECKHAM would be an object in the class FOOTBALLER.
Footballers have various abilities such as RUNNING and PASSING and within an object-oriented program these abilities would be known as methods. If a method is used in an OOP then it will generally only affect the object rather than the whole class so that only David Beckham would be passing the ball at a given time.
Where Visual Basic really benefits from being fully object oriented is when it comes to inheritance. Each class has a series of subclasses (in this instance the different positions in a football team; GOALKEEPER, DEFENDER, MIDFIELDER and STRIKER) that inherit particular methods from the parent class. The advantage of object-oriented systems is that the programmer need only apply the method (say, PASSING) to the parent class and the subclasses will automatically inherit it. This 'once-only' approach saves significant time and allows for extensive reuse of coding.
But that's not all. Subclasses can vary their traits to create more specific and appropriate methods and commands. For instance the method CROSSING could be added to the MIDFIELDER subclass, meaning that only MIDFIELDERS would have the ability to cross the ball. Based on inheritance there are myriad variations in how methods can be applied to classes and subclasses, all with relatively straightforward coding.
Don't worry if all these interactions sound overly complex and confusing as OOPs are also blessed with abstraction. This principle means that the programmer is able to pick and choose the most appropriate class or subclass to the problem at hand. So DAVID BECKHAM can be a MIDFIELDER when required to cross the ball and a FOOTBALLER or even plain old SPORTSMAN when necessary. Again this tool allows Visual Basic to run more directly and accurately especially when there are different levels of coding required.
The world of object-oriented programming is a fascinating and revolutionary one that is changing the way programs such as Visual Basic work. The theory may require a little time and help to get your head around but once you have a firm grasp of the way it operates whole new areas of programming will open up for you.
Author is a freelance copywriter. For more information on access visual basic, please visit https://www.stl-training.co.uk
Original article appears here:
https://www.stl-training.co.uk/article-449-oops-visual-basic-did-it-again.html
London's widest choice in
dates, venues, and prices
Public Schedule:
On-site / Closed company:
TestimonialsThe Accountancy Cloud
CLIENT SERVICES MANAGER Asima Hafesji Excel Introduction Great teacher, very knowledgeable, nice venue air conditioned space to learn in on the hottest day of the summer! Phoenix Consulting
Senior Quantity Surveyor John Davies Power BI Modelling, Visualisation and Publishing Jens was brilliant, the topics covered were great. As a complete newbie to PowerBI I feel I have learned more in 2 days than I could possibly have hoped for Queen Mary University
Molecular Biology Tech Elena Rostkova Excel Intermediate We've learned a lot of very practical and useful thing. Practically everything I will be able to use in my work. Plus this course gave us very good base to investigate other options |
PUBLICATION GUIDELINES