2 ms·
My one liner for what oop is: Objects are groupings of data (constituting a new data type, in a typed language) with specialized functions that only work on the
by unethical_ban 3y ago
My one liner for what oop is: Objects are groupings of data (constituting a new data type, in a typed language) with specialized functions that only work on them.
I know you know, but it even took me a long time to get the utility.
- hospitalJail 3y agoLets see, what I would describe it as: You would use classes if you have a category of something with similar attributes that you would want to do various manipulations on and get various outputs. My next sentence was going to be an example about a car and calculating the number of seats. Its a shame how quickly I need to move to a real world example, but when talking to a programming noob, I feel bad for saying the word attribute/class/method. I feel less bad about functions, they should know this stuff from 8th grade.