object oriented programming, tutorial  a classical procedural program (written in cobol, fortran, basic, pascal, lisp or apl2) is made of sentences that execute sequentially in a predefined order, that depends only on the values of the data the program is working with. this order can usually be deduced by visual inspection of the program.  a non- procedural program (written in prolog, for instance) contains a certain number of instructions that will not be executed in a predefined order. they receive control from an inference processor, a procedural program that decides in every moment the order in which the sentences of the program should receive control (should be fired).  in both the procedural and the non-procedural cases, the basic unit of execution is the program. the data only provide values that will be used to perform computations or to decide the order of execution. a given application is a hierarchical set of programs (modules) each of which is capable of invoking other programs in the hierarchy. the data may be global (accessible from every program in the hierarchy) or local (accessible by the program where they belong and, sometimes, by those at a lower level in the hierarchy).  in object-oriented programming (oop in short), things are different. here it is the data that are organized in a basic control hierarchy. one piece of data may be linked to another through a relation of descendancy, and this fact gives rise to a network (usually a tree) similar to the hierarchy of programs in procedural programming. there are also programs in oop, but they are appendages to the data (in the same way as in classical programming data are appendages of programs). it is possible to build global programs (accessible to all the data in the hierarchy) and local programs (accessible from certain objects and their descendants).  in oop, the execution of a program is fired by means of a message that somebody (the user, another program or an object) sends to a given object. the recipient of the message decides which program should be executed (it may be a local program, or a global program which must be located through the network that defines the structure of the objects).  there is a certain amount of confusion on what is object-oriented programming and what is not. this has happened before, with other fields in computer science. there are still people, for instance, that call artificial intelligence to any program that is written in prolog or lisp. in the same way, there are those who maintain that any program written in smalltalk, c++ or objective c is oop. as in the ai example, this is not always the case.  another source of confusion comes from the fact that object-oriented programming has been frequently used to build complicated user interfaces, with window systems, icons and so forth, and this has produced the unexpected results that many people believe that any program including these interfaces is oop. again, this is obviously wrong.  the basic elements of oop are objects, methods and messages.  an object is a complex data element that possesses structure and is a part of an organization. it embodies three different concepts:  a set of relations to other objects (usually represented by pointers).  a set of properties (which have values).  a set of methods (defined by means of executable code).  a method is a procedural program written in any language. what other programming systems call functions, programs or procedures, object-oriented programming calls methods. there is no essential difference between programs in any language and methods, except for the fact that in pure oop the call instruction is not allowed. the reason for this is obvious: the call instruction is  manuel alfonseca