Look at the object from everyday life
In fact, this place is not stranger for us because of our daily life. Everywhere is the object, a small to the ground, the garden of the Great Wall, the Great Wall of China, the pyramid of Egypt, all things are objects (all things are objects)
The reason why us will be more unfamiliar to the object, because we don't just call them directly, then how do we usually call these objects? Usually we will call it with this object classification, such as many cars on the road, there are many birds in the sky. The car here, the birds are just a classification of an object, and these categories We are used to call them. So there are many cars, birds, etc. in the world.
So what is the relationship between objects and classes? Object is an instance that the adherence is generated, not a class. Class is just an abstract title, and the object is a way to get, touch, and listen to the instance
Otherwise, we don't have to call an object with the name of the class, but directly use the name of the object, such as my family has a dog, its name is Xiaobai, the dog here is a class name, and Xiaobai is the name of the object. . Since it is called Xiaobai, it is not called Xiao Huang, Xiao Black, must be its place in which it is different from other dog objects, such as hair color, and you may be its owner, because we are very small dog naming. And the color of the hair, who is all used by the owner, etc., we are called the property. So the attribute is used to describe an instance object, because of these properties, each object in the world is different, each object also has their own behavior or the use of them, such as a dog will run Called, we call these actions as a method. The attribute just said is a static side of the object, used to describe some of the objects, and now the method of these methods attribute objects, you can use these methods to operate an object, we call the property to be aware of this object Members, because they are the main part of an object, there is no two things, then the object has no meaning. Even just a momentum, or there is no way to operate, but also describe its properties. There is no class without attributes and methods, but it doesn't have a role in the object of the Great Wall. You can't identify and use it. This kind of Cui is usually only one use, which is a rule, then comply with this rule. Come to do some specific things