title: Do setter and getter methods breaks encapsulation?
body: <p>It is told that we should avoid setters and getters. There are various school of thoughts about it, but according to me using these breaks encapsulation. Why? because it tells the world about the internals of an object. For example:</p>
  
  <pre><code>class Point {
    private int x;
    private int y;
  
    void setx(int x) {...}
    int getx() {...}
    ... 
  }
  </code></pre>
  
  <p>The object should just expose the behavior providing the clear abstraction to the client.</p>
  
  <pre><code>class Point {
    private int x;
    private int y;
  
    int coordinate(int x) {...} // 0, 1, 2, 3
    ... 
  }
  </code></pre>
  
  <p>so, is this true that these accessor and setter methods breaks encapsulation?</p>