Audience: Those who have a basic understanding of the concepts of Inheritence, OOP and memory reference. For more information on any of these subjects, I have additional tutorials written here -> http://www.dreaminco...Balias120sblog/

Specs: Written with the C++ Standard Library. Compiled in VS2008 C++ Express Edition.

Implementation
This tutorial is designed to give a basic overview of one of the many uses of Abstraction. By designing your program to take advantage of abstraction, you are decreasing the amount of overhead by "hiding" implementation. I will use a purely logical example to illustrate this point.

You have an office building with many different departments. You could consider this an example of modularity. A member of the sales department delivers the results of their monthly figures to the finance department. This is where the abstraction takes place. The sales department does not need to know the details of how the finance department implements the information given to them. This keeps the sales department from having to compute the figures themselves, thus decreasing their workload.

This also allows for another aspect of Abstraction to be implemented. Extensibility. The layout of our company allows for additional departments to be created without effecting the existing ones. This is one of the major strong points of abstraction.

The program below illustrates this. A base class of shape has two classes inheriting it's pure virtual functions, square and triangle. Traditionally, if we wanted to use the functions of any of the inherited classes we would need to initialize an object of that class, and then directly call the function itself. What if we could just create one function that would pass a reference of whatever object we needed to use, and have Inheritence take over? That is exactly what you will see here. The program is documented throughout to assist in further explanation.