Skip to content

Fundamentals of Programming

In this article I will try to explain the basics of oriented programming objects, which derives from the old structured programming and had numerous defects. Object-oriented programming allows you to break down more easily a problem in subgroups of related parties of the problem. Then, using the language these subgroups are can translate into objects. The term programming oriented objects (OOP), now widely used, is difficult to define, since it is not a new concept, but it has been the development of programming techniques since the beginning of the Decade of the seventies, even in the Decade of the nineties when it increased dissemination, use and popularity. However, you can define POO as a technique or style of programming that uses objects as essential building block. An object is a unit that contains data and functions that operate on that data. The elements of an object are known as members; functions that operate on the objects are called methods and data is called data members. An object controls something, when another part of the program you want to use something, calls the object that controls it and this makes it, when you want to extend the use of that something, solohas modify the object and the rest of the programme there will be amended sinnecesidad to touch any code.

Another operating system takes as an example a programmea change. If you agrupas calls to the system on an object, with only modify the object so that you use the new operating system, the many program run without changes, fantastic no?. An object is like a mini-Setup, it contains data that necesitay functions that handle them. This is called encapsulation, because data and the functions that handled it are encapsulated (grouped). This so that other parts of the program do not modify them directly, but through the functions of the object. Summing up an object is characterized by: designers define new classes (or types) of objects. Objects have a series of operations associated with them.

Operations tend to be generic, i.e., they operate on multiple data types. Kinds or types of objects share common components through inheritance. To be able to describe all the objects of a program, should be grouped into classes. Class: We can consider a class as a collection of objects that possess characteristics and common operations. A class contains all the information needed to create new objects. Encapsulation: Already we have described it above, but it really is a technique that allows you to locate and hide the details of an object. Encapsulation prevents an object to be handled by different defined operations. Encapsulation is like a black box hides the data and only allowing access to them in a controlled manner. Finally will discuss as a class for example Crectangulo is used, and is follows: CRectangle class int x, and; public: void set_values (int, int); int area (void); rect; We explain it in other words: CRectangle class and object is called RECT variable to Act (width) and x (length) and are of integer value method public (accessible) void set_values (int, int); insert values length & width int area (void); result of nmerico of the area in a next installment DFSG more in these aspects.

Comments are closed, but trackbacks and pingbacks are open.