Guest User

Untitled

a guest
Dec 14th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. package handout.assignment.pkg2.main;
  2.  
  3. /**
  4. *
  5. * @author Tim
  6. */
  7. public class Punt {
  8.  
  9.  
  10. private int x, y;
  11.  
  12. public Punt() //constructor zonder argumenten voor oorsprong 0,0
  13. {
  14. this(0,0);
  15. }
  16.  
  17. public Punt(int x, int y) //constructor voor punt x en y
  18. {
  19. this.x = x;
  20. this.y = y;
  21. }
  22. public void print()
  23. {
  24. System.out.println(" (X, Y) = ("+x+", "+y+")");
  25.  
  26. }
  27. }
Add Comment
Please, Sign In to add comment