Sunday, October 2, 2011

Object-oriented programming


Object-oriented paradigm has given class hierarchy. Object-oriented programming metaphor B. Straustrupa, author of C + + - one of the most popular languages ​​for object-oriented programming - a highly intellectual synonymous with good programming. Indeed, new programming paradigms appear less frequently, not more than one per decade. The fact that object-oriented paradigm has been used successfully for 20 years, itself is an important confirmation of its viability.
The algorithms are implemented in procedural programming, too specific. Any modification - this is a new algorithm and thus the number of procedures and functions that are in use, excessive increases. Modular programming algorithms are grouped into modules, while inkapsulyuyuchy data structures. It now remains to take the next step - to build a hierarchy of modules or classes.
Such hierarchies may be two. The first of them - to be part of something. For example, the line is part of polyhedra, ridge - part of the face, top - part of the rib.Another hierarchy - to be a generalization or specification. For example, oval and polygon are specifying a plane figure, the circle - specifying an oval, quadrangle - specifying the polygon, quadrilateral further specification can serve as a parallelogram, rectangle, rhombus, square. The fact that a square, rhombus, rectangle is a parallelogram allows them full access to all software made for a parallelogram, a parallelogram, in turn, is a full quadrangle, and so on. This principle, known as reusable - again - Used became one of the most important achievements of object-oriented paradigm. Again, using already existing software in more concrete terms, we appends only the part concerning the characteristics of existing concrete. This principle was named programming by difference or posting programs.
Finally, object-oriented paradigm brings to the logical completion of the principle of modeling the real world, or rather the part, which serves as an abstraction program. With this approach, the program consists of objects that correspond to real objects or concepts. Implementation of the program is reduced to the interaction of objects, which serves as an abstraction of the real interaction prototypes. All this has provided an object-oriented approach is unquestionable leadership in developing programs.
Today the family of languages ​​object-oriented programming three most prominent representative: C + +, Java and C # (C Sharp read). C + +, and today remains a recognized leader in the development of large and complex software systems.Java and C # have grown up with C + +. They have their scope of application in distributed programming and will be studied by us later.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...