The Defined
, Posted in: News, Author: AWHadmin (August 27, 2017)
This is thus so that other parts of the program do not modify them directly, but through the functions of the object. In summary an object is characterized by: The designers define new classes (or types) of objects. The objects own a series of operations associated them. The operations tend to be generic, that is to say, they operate on multiple types of data. The classes or types of objects share common components by means of inheritance mechanisms. In order to be able to describe all the objects of a program, it agrees to group these in classes.
Class: We can consider a class like a collection of objects that own common characteristics and operations. A class contains all the information necessary to create new objects. Encapsulation: We have already described it superficially previously but really it is a technique that allows to locate and to hide the details of an object. The encapsulation comes up that an object is manipulated by operations different from the defined ones. The encapsulation is like a black box that hides the data and it only allows to accede to them of controlled form. Finally I will expose as a class for example Crectangulo is used, and is of the following way: class CRectangle int x, and; public: void set_values (int, int); int area (void); rect; We explain this with other words: class ” CRectangle” and the object is called ” rect” variables to act ” x” (long) ” y” (wide) and they are of whole value method I publish (they can accede)? ” void set_values (int, int); ” to introduce values long and wide? ” int area (void); ” result of nmrico of the area In a following delivery I will deepen more in these aspects.
Comments
Comments are closed.