current position:Home>Object oriented foundation ----------- object oriented understanding 01

Object oriented foundation ----------- object oriented understanding 01

2022-01-26 22:21:30 S_ two thousand three hundred and thirty

Object oriented understanding

Object oriented is an abstract programming idea , There is an idea in many programming languages

give an example : Wash the clothes

First of all, there are several ways to wash clothes ? ( Hand wash / Machine wash )

Hand wash : Find Basin -- water -- Put the clothes on -- Add washing powder -- soak -- Scrub -- Wring out water -- Pour water -- Rinse N Time -- Continue to wring dry -- Airing

Machine wash : Plug pipe -- Plug in the power supply -- Turn on the washing machine -- Put the clothes on -- Add washing powder -- Press the start button -- Airing

Compare the two methods , You'll find that method easier ?

Machine washing is simpler

Right , Machine wash , Just find a washing machine , Add simple operation steps to complete the work of washing clothes , And we don't need to care about the working principle inside the washing machine

summary : Object oriented is to treat programming as a thing , For the outside world , Things are used directly , You don't have to worry about his internal situation . Programming is about setting what things can do ( You can understand from the example of washing machine above )

 

copyright notice
author[S_ two thousand three hundred and thirty],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/01/202201262221287113.html

Random recommended