diff options
Diffstat (limited to 'Week4')
-rw-r--r-- | Week4/src/oo15loipe/Punt.java (renamed from Week4/src/week4/Punt.java) | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Week4/src/week4/Punt.java b/Week4/src/oo15loipe/Punt.java index daaddd6..1939c45 100644 --- a/Week4/src/week4/Punt.java +++ b/Week4/src/oo15loipe/Punt.java @@ -1,3 +1,5 @@ +package oo15loipe; + /** * Een Punt in 2D * @author pieter koopman @@ -68,4 +70,8 @@ public class Punt { public String toString () { return "(" + x + "," + y + ")"; } + + public Punt add(Punt plus) { + return new Punt(x + plus.getX(), y + plus.getY()); + } } |