Interesting , OOD( Object-Oriented design) archives that by techniques such as information hiding,encapsulation , inheritance , and polymorphism .The most relevant to ur Q is the first (information hiding), which is basically hiding the internal implementation of the class within itself , and this is achieved by dividing the class's into two sections : a public and a private one. The class data should be private , and methods are generally public ( but there r exceptions ) .
Hiding the data ( making it private ) enables BUT providing methods to safely access it enables changes in one class without affecting other classes in application.Example, imagine u wrote a DrawingBrush class which has methods such as paint(), clear() , getColor(), setTransparency(), then u gave this class to ur fellow to use for another project and they use it in that.
Now after some months , u came to get a better implementation for the methods' algorithms ( clear(), paint(),etc) , and u want to give the new version of the class to ur fellow to use, then as long as u change the signature of these methods , u din't change the names and signature for ur methods, ur fellow can happily use the new class ; just because (1) u din't give them the data at first (2) u didn't change the signature for the methods in second time
..hope this help!