Subject and object

Source: Internet
Author: User
Similarity:
From the perspective of software engineering, the two concepts are the abstraction of behavioral entities in application systems and software systems at different levels, supports natural modeling of behavioral entities in application systems and software systems, and guides the final implementation of the system. Software systems can be constructed as basic module units of software. different degrees of encapsulation and Information Hiding mechanisms are provided to facilitate maintenance, reuse, and high-quality software systems.
Differences:
1. Definition method:
An object encapsulates attributes and operations and can exchange information with other objects. It can be seen that objects depict the components, functions, and relationships of entities.
The entity that resides in an environment and can execute actions autonomously and flexibly to meet the design objectives. It can be seen that the internal structure is not defined, and only external features are described. The subject is a black box, and its internal structure is unknown.
2 degree of Abstraction:
Objects define the internal structure of objects, which is closer to the computer world.
The subject only expresses external characteristics, which is closer to people's intuitive understanding of real-world entities and has a higher abstraction level.
3. Autonomy
The object can operate on its own attributes. If the object method (public) is activated by another object in the form of a message, it is executed. Therefore, the execution of object methods is controlled by other objects. The autonomy of objects is more reflected in the control of internal states, without the autonomy of behavior.
Autonomy is the basic attribute of the subject, and the subject can control its own status and behavior.
4. Flexibility
The subject has different degrees of flexibility, and the object has limited flexibility, such as a simple stimulus response.
5. Running continuity
In order to achieve the design goal, the subject generally needs to continuously run and interact with the environment in the environment.
The object runs intermittently. After receiving the message, run the code, and then wait.
6 interaction nature

To be continued
.................................

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.