OO object-oriented

OO object-oriented


Object-oriented programming is to split a task according to the concept of "object".

For example, for the task of garbage collection (from garbage being produced to being sent to the factory to make new products), according to the OO idea, we can assign it to transport workers, recycling machines in recycling plants, and regulators.


Garbage collection task allocation diagram

Transporters are responsible for transporting the garbage from the community to the recycling treatment plant, and sending the processed materials to the new product processing factory; the recycling machine is responsible for recycling the garbage; the supervisor is responsible for supervising these three processes and the emergencies during the treatment process.

This is OO.




Guess you like

Origin blog.csdn.net/weixin_39591031/article/details/109680340