Advertisement
Guest User

Untitled

a guest
Jun 24th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1.  
  2. /**
  3. * Created by Jakub on 6/25/2016.
  4. */
  5. public class Figure {
  6.  
  7. public int x;
  8. public int y;
  9.  
  10. public Figure(int x, int y) {
  11. this.x = x;
  12. this.y = y;
  13. }
  14.  
  15. public int sum() {
  16. return getX() + getY();
  17. }
  18.  
  19. public int getX() {
  20. return x;
  21. }
  22.  
  23. public void setX(int x) {
  24. this.x = x;
  25. }
  26.  
  27. public int getY() {
  28. return y;
  29. }
  30.  
  31. public void setY(int y) {
  32. this.y = y;
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement