What is object-oriented?
Object-oriented is: put the data and the operation method on the data together as an interdependent whole - the object. Abstract the commonality of similar objects to form a class. Most of the data in the class can only be processed by the methods of this class. A class has a relationship with the outside world through a simple external interface, and objects communicate with each other through messages. The program flow is determined by the user in use. An object is a concept that people abstract from various concrete objects. People come into contact with various objects every day, such as a mobile phone is an object.
Object : An object is an instance of a class ( the object is not looking for a girlfriend ), has state and behavior. For example, a dog is an object, its states are: color, name, breed; behaviors are: wagging tail, barking, eating, etc.
Class : A class is a template that describes the behavior and state of a class of objects.