Current location - Education and Training Encyclopedia - Education and training - Zhaotong java Training School tells you what is object-oriented and what are its characteristics?
Zhaotong java Training School tells you what is object-oriented and what are its characteristics?
In programming languages, the use of object-oriented is very important, and it took many years for PHP to acquire this technology. The appearance of object-oriented is a major reform in system development, and programming languages begin to return to data from applications. The object-oriented programming process focuses on the modeling of real entities, which makes the application closer to the real world. The following computer training mainly introduces object-oriented for everyone.

First of all, what is object-oriented?

Just like you are the president of the company, what you do is to assemble a computer. In other words, object-oriented is an abstract execution, or it is done by employees. In detail, the president does not need to consider this issue. IT training thinks the benefits are obvious. Companies with top management can coordinate their work. Without top management, only a few specific employees will get into trouble.

Second, the characteristics of object-oriented

1, packaging

Hide the attributes and implementation details of the object, only expose the interface to the outside world, and control the access level of reading and modifying the attributes in the program; Abstract data and behavior (or function) are combined into an organic whole, that is, the source code of data and operation data is organically combined to form a "class", in which both data and function are members of the class.

2. Legacy

Inheritance is a mechanism to derive one or more classes from a base class. A class that inherits from another class is called a subclass of that class. This relationship is often compared to father and child. A subclass inherits the properties of the parent class. These properties consist of properties and methods. Beida Jade Bird thinks that subclasses can add new functions beyond the parent class, so subclasses are also called "extensions" of the parent class.

3. Polymorphism

Polymorphism means that OOP can redefine the nature or behavior of a class according to the context in which it is used, or that many different implementations of an interface are polymorphic. Zhaotong Beida Jade Bird suggested that if different sub-objects are taken as the parent class, we can shield the differences between different sub-objects, write general code and carry out general programming to adapt to the changes in requirements.