Object Oriented Programming

Author: Neil White

The concept of "object oriented programming" (OOP) has been around for some time now, and it has had something of a checkered past. Now, though, it's a commonly accepted method of creating reusable software code. It has its passionate advocates and decriers, but like many things that create heated arguments it is basically something useful for level heads to have as an option.

OOP came to the fore as a programming method through the 1980s, and gained acceptance largely through the popularity of the C++ and, more recently, Java languages. There are many commonly used OO languages, though, and a growing number of languages are adding object oriented capabilities. The reason for this is because programmers simply like to have the facility available. After all, few object oriented languages disallow the use of procedural programming techniques, so even within a particular language the programmer can choose how to proceed.

Using clear and simple examples this article will try to make clear what object oriented programming is, and how to apply it when approaching a programming problem. First there'll be a look at the fundamental OO concept, the class, and what is the relationship between a class and an object. The idea and benefits of encapsulation are examined, showing how it is of great benefit for the security of data and reusability of code.

Beyond that various extensions of the class are looked at, including inheritance and polymorphism, which give a greater scope to object oriented programming. Because the Unified Modelling Language (UML) is probably the most commonly used method of object modelling, the class diagrams in this article are UML based.

Last Update: Sun Oct 1st 2006