Maybe your brain was made for functional programming :)
I remember that one of the inventors of OOP regretted the name, and said that he should have called it "object message passing" or something like that.
OOP at its core is that, sending messages to objects so they can perform actions on their state.
Inheritance is a way for a family of objects to share some of that behavior (and/or some of that state). There's not a single way to implement inheritance of behavior/state.
Encapsulation is a way to hide away some of that state from prying eyes. Not all languages effectively have encapsulation.
I would say the tenent of OOP is really what the author said: sending messages to objects so that they can act.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Maybe your brain was made for functional programming :)
I remember that one of the inventors of OOP regretted the name, and said that he should have called it "object message passing" or something like that.
OOP at its core is that, sending messages to objects so they can perform actions on their state.
Inheritance is a way for a family of objects to share some of that behavior (and/or some of that state). There's not a single way to implement inheritance of behavior/state.
Encapsulation is a way to hide away some of that state from prying eyes. Not all languages effectively have encapsulation.
I would say the tenent of OOP is really what the author said: sending messages to objects so that they can act.