Advertisement
Guest User

Oefening 6.7 Cirkel class

a guest
Mar 30th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public class Cirkel {
  2.  
  3. private int x;
  4. private int y;
  5. private int straal;
  6.  
  7. //CONSTRUCTOR
  8. public Cirkel(int x, int y, int straal) {
  9. this.x = x;
  10. this.y = y;
  11. this.straal = straal;
  12. }
  13.  
  14.  
  15. //SETTERS
  16. public void setStraal(int straal) {
  17. this.straal = straal;
  18. }
  19.  
  20. public void setMiddelpunt(int x, int y) {
  21. this.x = x-(straal/2);
  22. this.y = y-(straal/2);
  23.  
  24. }
  25.  
  26. //GETTERS
  27. public int getStraal(){
  28. return straal;
  29. }
  30.  
  31. public int getX(){
  32. return x;
  33. }
  34.  
  35. public int getY(){
  36. return y;
  37. }
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement