There are loli control, royal sister control and queen control in the world, so there is a saying that everything is controllable

Same thing with object orientation, everything is an object

Object to the word you can understand as a general, such as men and women, was called candle whip props are high-heeled shoes, and so object oriented originally means “object” was called, just a translation not the original, therefore, the house is an object, the plane is object, the cat is objects, the tree is an object, a girlfriend and object, and object has uniqueness: Your house is yours, not mine. The beauty you see abroad is not the beauty I see in China. Your ID number is different from mine

What do you have in a house? There are computers, action DVDS, war videos, body art magazines… Now the things that are “contained” in the house are not things, they are called “properties”…

Object, attribute have, the rest is the method method is also very easy to understand ah, it means that you want to get a certain result, you need to use specific methods such as your girlfriend angry to coax, not happy to amuse her happy, “coax” and “tease” these is to let the girlfriend held-bent method…… Such as this, discover a United States eyebrow to want to use “chase after” this method, go shopping with girlfriend to encounter beauty to want to use “peep” this method, be in love to want to use “talk” this method……

Object is a concept, everything is called an object (there is nothing that is not an object) — property is a component of that thing, all that can be included is called a property (there is no object without property) — method is the way to achieve the goal, All possible behaviors become methods (there are no objects and properties of non-methods, but you can choose which methods to use)

Therefore, the right object should be established in the design: WHAT WE are looking for is MM, not a dinosaur. It is obvious that the “object” of sister Furong is not normal people when you establish the right object. After determining the right object, we should find out her temperament and hobbies — the attributes of the object are: Height 165cm, weight 45kg, circumference 84cm, 66cm, 86cm, single then you have to use the right way to pursue, chat (parameters are fashion, beauty, etc…) , watching movies (romance, horror, kimchi), sending flowers (3, 11, 999)

Now it’s time to clarify the definition of objects, properties, and methods

Then there’s encapsulation, inheritance, polymorphism

Packaging is to protect the girlfriend, can not be seduce others in the past, because want to let she “only” listen to your rhetoric, he didn’t catch up before don’t introduced to somebody, a handsome boy, so his wife is his, not to others, that is “privacy packaging”, for example, your account – this object, money in the lottery – this property you 1 $, If you win $10 billion in the lottery and scatter money all over the street, this is “global encapsulation” — encapsulation is to determine the scope of use of the object. Of course, I don’t mind helping you if you let me spend it for you

Inheritance, if your family property is not donated, then your son is the natural heir, this is called single inheritance, your seven or eight children divided, this is called multiple inheritance… Also, if the beneficiary of accidental injury is not written in the name of someone else, it cannot be inherited… Inheritance determines which objects can use properties and methods of an object

Polymorphic, for example, you are good at doing Chinese food, your son is good at doing western food, your daughter is good at doing dim sum, now you have an iron elder brother on your home visit to have a meal, he uses to have a meal this method – your home. Have a meal (Chinese food), can taste pork stewed vermicelli, use – your home. Dinner (western food) can eat steak, so – use your home. Eat (snack) can taste the pastry, this is the polymorphism of “eat” this method, because you can not limit eating to eat only one thing ah, like the door can use a key, can also swipe cards, can also be remote control and so on – polymorphism is the same method of different operation