<- Previous Page Home Page

Summary

One of the most important concepts of OOP (Object Oriented Programming) is the data encapsulation concept, which means that there is a very close attachment between data items and procedures. The procedures (methods) are responsible for manipulating the data in order to reflect its behaviour. The public interface, formed by the collections of messages understood by an object, completely defines how to use this object. Programs that want to manipulate an object, only have to be concerned about which messages this object understands, and do not have to worry about how these tasks are achieved nor the internal structure of the object. The hiding of internal details makes an object abstract, and the technique is normally known as data abstraction. Normally, objects of a given type are instances of a class, whose definition specifies the private (internal) working of these objects as well as their public interface. Basically the creation of an object is referred to as instantiation, and it consists of a class definition with appropriate initial values.

Another powerful feature of OOP, is the concept of inheritance (derived classes in C++), meaning the derivation of a similar or related object (the derived object) from a more general based object. The derived class can inherit the properties of its base class and also adds its own data and routines. The concept above is known as single inheritance, but it is also possible to derive a class from several base classes, which is known as multiple inheritance. Overloading, in OOP, means the ability to assign multiple meanings to the names of operators and functions. For example, the operator +, normally associated with arithmetic addition can be overloaded to add one list to another in a certain context. Polymorphism means the sending of a message to an object without concern about how the software is going to accomplish the task, and furthermore it means that the task can be executed in completely different ways depending on the object that receives the message (in C++, polymorphism is implemented through the use of virtual functions). When the decision as to which actions are going to be executed is made at run-time, the polymorphism is referred to as late binding (as in the case of virtual functions). If they are made at compile time then it is known as early binding.

Conclusion

Object-oriented programming offers a new and powerful model for writing computer software. Objects are "black boxes" which send and receive messages. This approach speeds the development of new programs, and, if properly used, improves the maintenance, reusability, and modifiability of software.

The importance and the necessity of the concept object orientation can be realized more clearly when you will work with it in real life. Every aspects of object oriented programming are useful. Nonetheless, OOP does not provide new solution for unsolved programming methods or programs but it extends or improves the view and the solutions more clearly. Some may say it is a drawback but hey, what you have to loose when u are getting better run time, algorithm, compilation, code, structure and of course back up. Go for it!

Page-10

<- Previous Page Home Page