Someone could've explained me "you're doing it wrong" 2 yrs ago .. wouldn't have made any difference. Coders 'discover' OO by themself, teaching it to them is a waste o' time. ^_^
I beg to differ. You can be taught it in 2 weeks, but it might take you years to discover on your own. But why is it called "Object-Oreinted" and not "Self-Contained" or something like that?
Because encapsulation is only a subset of the Object Oriented Paradigm. Other things to keep in mind are the "Seperation of Concerns", a multi-layed software architecture, a high coherency, low coupling and ultimately the application of software design patterns to solve often occuring common design problems, all resulting in a high degree of reusable code.The main points of the Object Oriented Paradigm, is that EVERYTHING is an object, and an object is defined by a unique Identity (its name or reference), a State (often a collection of Fields or Attributes) and Behavior (usually Methods or Functions).