Object oriented programming, tutorial

Author:

Alfonseca Manuel1

Affiliation:

1. IBM Madrid Scientific Center, Paseo de la Castellana, 4, 28046 Madrid (SPAIN)

Abstract

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

Publisher

Association for Computing Machinery (ACM)

Reference5 articles.

1. Smalltalk- V User's Guide. Digitalk Inc. Smalltalk- V User's Guide. Digitalk Inc.

2. Frames, semantic networks, and object-oriented programming in APL2

Cited by 3 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. An object-oriented APL2;ACM SIGAPL APL Quote Quad;1994-10

2. ARDA;ACM SIGAPL APL Quote Quad;1993-09

3. Object oriented graphics in APL2;ACM SIGAPL APL Quote Quad;1992-07-15

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3