Abstraction

Abstraction is the process by which we can think about specific properties or behaviors without thinking about a particular object that has those properties or behaviors. We know that most cars have four wheels, a steering and an engine, without thinking of any particular car, or how the internals of the engine operates.

Abstraction allows us to recognize how things are similar and ignore differences - to think in general terms, and not the specifics. A

TextBox
control is an abstraction, because we can place it on a form, and then tailor it to our needs by setting properties. Visual Basic allows us to define abstractions using class modules.

Any language that allows a developer to create a class from which objects can be instantiated meets this criteria, and Visual Basic is no exception. We can easily create a class to represent a car, essentially providing an abstraction. We can then create instances of that class, where each object can have its own attributes such that it represents a specific automobile.

© 1997 by Wrox Press. All rights reserved.