+ 1
How to learn Object Oriented Programming?
I am stuck in OOP from 4 months. what is the most effective way to learn OOP.
2 Antworten
+ 9
OOP is a bit of a mental shift from procedural or functional programming. The concept of grouping functions with data can grate on the sensibilities, but try to ponder this:
There are operations which are fundamentally different for different types of data. Compare multiplication of integers to multiplication of matrices. And some operations make little sense when applied elsewhere (user a bit shift operator I a char? yuck!)
OOP is about combining the fundamental operations, properly implemented, with the data, so you can ignore the details of the underlying code. You don't have to worry about whether or where you do your sanity check on input values if you just get in the habit of doing it when an object is created or updated.
It's a bit different thinking that way, but it does protect you from some common errors, and
+ 9
bah, clumsy finger. ....and it makes collaboration do very much easier.