Object-oriented programming: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 190:
===Encapsulation===
 
[[Encapsulation (computer programming)|Encapsulation]] prevents external code from being concerned with the internal workings of an object. This facilitates [[code refactoring]], for example allowing the author of the class to change how objects of that class represent their data internally without changing any external code (as long as "public" method calls work the same way). It also encourages programmers to put all the code that is concerned with a certain set of data in the same class, which organizes it for easy comprehension by other programmers. Encapsulation is a technique that encourages [[Coupling (computer programming)|decoupling]].
 
===Composition, inheritance, and delegation===