Most of the time, when talking about objectsProgramWhen teaching, many teachers also say this. However, in real project development, such a definition does not make any sense, because as long as you use an object-oriented language, this definition is already included in the language, therefore, it is completely repetitive to transmit such a definition to developers during program development without any practical significance.
In my opinion, the definition of objects cannot be generalized. objects are classified into different levels, so the definition of objects should be classified into two levels, they are large objects and small objects.
A small object refers to the definition of a class instance that we often hear. This definition is suitable for expressing what an object is in the machine world.
So what are the objects in the real world? I would like to call it a big object. In terms of small objects, it comes from the real world. It actually exists, and it also has attributes and behaviors. However, large objects cannot be mapped to small objects one by one. Some can be like person, and some need to be mapped to multiple small objects, for example, in an interactive program, a large object of person can be mapped to personview + personmodel.
Why is this distinction made? Because small objects are derived from large objects, a good design is a good connector between the real world and the machine world, because a good design needs to artificially distinguish objects in the real world from objects in programs, because the two are often not one-to-one.