What are the characteristics of object-oriented
This tutorial operating environment: windows7 system, DellG3 computer.
Object-oriented is a method of understanding and abstraction of the real world, is the product of the development of computer programming technology to a certain stage, is a is a software development method
Object-oriented mainly has four major characteristics
Ignore a topic in the things that have nothing to do with the current goal, and focus on attention with the current goal aspects that are relevant. (That is, a certain type of thing in the real world, extracted, represented by program code, abstracted generally called classes or interfaces). Abstraction does not intend to understand the whole problem, but to select a part of it and not use some of the details for the time being. Abstraction consists of two aspects, a data abstraction, but rather process abstraction.
Data abstraction – > represents the characteristics of a class of things in the world, that is, the properties of an object. For example, a bird has wings, feathers, etc. (attributes of a class)
Process abstraction – > represents the behavior of a class of things in the world, which is the behavior of an object. For example, a bird can fly and call (methods of a class)
Encapsulation is one of the characteristics of object-oriented, is the main feature of the concept of objects and classes. Encapsulation is to surround the process and data, access to the data can only be through the defined interface. Such as private variables, with set, get methods to get.
Encapsulation ensures that the module has a better independence, making it easier to maintain and modify the program. Modifications to the application are limited to the interior of the class, thus minimizing the impact of application modifications.
A hierarchical model that links classes and allows and encourages class reuse, providing a way to explicitly express commonality. A new class of an object can be derived from an existing class in a process called class inheritance. The new class inherits the characteristics of the original class; the new class is called a derived class (subclass) of the original class, and the original class is called the base class (parent class) of the new class. A derived class can inherit methods and instance variables from its parent, and the class can modify or add new methods to make it more suitable for particular needs. Thus it can be said that inheritance is done to reuse the parent class code and also to prepare for polymorphism.
Polymorphism is the practice of allowing objects of different classes to respond to the same message. Polymorphism includes parameterized polymorphism and inclusion polymorphism. Polymorphic languages have the advantage of flexibility/abstraction/behavior sharing/code sharing, which is a good solution to the problem of application functions with the same name. In a nutshell, method overriding, overloading and dynamic linking constitute polymorphism. one of the reasons java introduced the concept of polymorphism is to compensate for the lack of functionality brought about by single inheritance of classes.
Dynamic linking – > For a method defined in the parent class, if the method is overridden in the child class, then a reference to the type of the parent class will call the method in the child class, this is dynamic linking.
Object oriented programming has many advantages:
1. Development time is short, efficient, reliable, and the programs developed are stronger. Because of the reusability of object-oriented programming, you can use a large number of mature class libraries in the application, thus shortening the development time.
2. Applications are easier to maintain, update and upgrade. Inheritance and encapsulation make the impact of application modifications more localized.
(If you need basic knowledge related to computer programming, you can refer to the Programming Learning Channel)
What are the characteristics of the object-oriented approach?
The main features are as follows:
(1) The software system is constructed from the things that exist objectively in the problem domain, and the object is used as an abstract representation of these things and as the basic unit of the system.
(2) The static characteristics of things (i.e., the characteristics that may be expressed by some data) are expressed in terms of the properties of the object, and the dynamic characteristics of things (i.e., the behavior of things) are expressed in terms of the services of the object.
(3) The properties and services of an object are combined into a single entity, shielding its internal details from the outside world, i.e., encapsulation.
(4) Categorizing things. Objects with the same properties and services are grouped together in a class, the class is an abstract description of these objects, and each object is an example of its class.
(5) By applying the principle of abstraction in varying degrees, it is possible to obtain more general classes and more special classes. Special classes inherit the attributes and services of general classes, and object-oriented methods support the description and implementation of this inheritance relationship, thus simplifying the construction process of the system and its documentation.
(6) Complex objects can use simple objects as their building blocks, called aggregation.
(7) Objects communicate with each other through messages in order to realize dynamic connections between objects.
(8) Static relationships between objects are expressed through associations.
Describe what are the characteristics of object oriented approach.
[Answer]:Object oriented is characterized by:
(1) Object uniqueness. Each object has its own unique identification through which the corresponding object can be found. Throughout the life of the object, its identification does not change, and different objects cannot have the same identification. When an object is created, there is a system that grants the new object a unique object identifier, which in turn plays a huge role in historical versioning.
(2) Categorizability. Categoricality is the abstraction of objects with consistent data structures (attributes) and behavior (operations) into classes. Each class is a collection of individual objects with the same properties, and each object is an instance of a related class.
(3) Inheritance. Inheritance is the mechanism by which subclasses automatically share the data structures and methods of the parent class, which is a relationship between classes. When defining and implementing a class, it is possible to build on an already existing class, taking what is defined by this already existing class as your own and adding several new elements.
Inheritance is the most important feature of object-oriented programming languages that distinguishes them from other languages and is not found in other languages. At the class level, when a subclass inherits data structures and methods from only one parent class, it is called “single inheritance”. A subclass that inherits data structures and methods from more than one parent class at the class level is called “multiple inheritance”.
(4) Polymorphism (polymorphism). Polymorphism means allowing objects of different classes to respond to the same message. Different objects, receive the same message can produce different results, this phenomenon is called “dynamic”. For example, the MOVE operation can be a window object move operation, can also be a chess piece move operation.
Polymorphism allows each object to respond to a common message in a way that suits it. This enhances the transparency, understandability, and maintainability of operations. Users don’t have to bother recognizing the same functional operation but acting on different types of objects.
Characteristics of Object-Oriented Technology
Characteristics of Object-Oriented Technology
Object-Oriented Technology is a programming technique that is based on objects and uses events or messages to drive the objects to perform processing. It has abstraction, encapsulation, inheritance and polymorphism.
Object-oriented programming methods encapsulate the data and operations on the data as a whole.
Object-oriented provides a variety of features that process-oriented does not, most notably, inheritance and polymorphism.
Object-oriented technology is polymorphic in nature, and the control flow is triggered by the actual occurrence of various events at runtime, rather than by a predetermined order, which is more in line with practical needs.
Object-oriented programming methodology describes the system in terms of data, which is more stable compared to functionality and therefore easier to maintain.