diff options
author | Camil Staps | 2015-02-26 16:05:54 +0100 |
---|---|---|
committer | Camil Staps | 2015-02-26 16:05:54 +0100 |
commit | bca99208b92d3f0afff63ecfa665a38ed8673b6d (patch) | |
tree | 8723bedd73a97a8fadd5f9f358c16d67574971e8 /Week4/src/week4 | |
parent | Merge branch 'master' into camil (diff) |
x
Diffstat (limited to 'Week4/src/week4')
-rw-r--r-- | Week4/src/week4/Punt.java | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/Week4/src/week4/Punt.java b/Week4/src/week4/Punt.java deleted file mode 100644 index daaddd6..0000000 --- a/Week4/src/week4/Punt.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Een Punt in 2D - * @author pieter koopman - */ - -public class Punt { - private int x, y; - - /** - * de gewone constructor - * @param i: x - * @param j; y - */ - public Punt(int i, int j) { - x = i; - y = j; - } - - /** - * copy constructor - * @param p - */ - public Punt (Punt p) { - if (p != null) { - x = p.x; - y = p.y; - } else { - x = y = 0; - } - } - - /** - * getter voor x - * @return x - */ - public int getX (){ - return x; - } - - /** - * getter voor y - * @return y - */ - public int getY (){ - return y; - } - - /** - * equals methode vergelijkt x en y - * @param o - * @return - */ - @Override - public boolean equals(Object o) { - if (o != null && o instanceof Punt) { - Punt p = (Punt) o; - return x == p.x && y == p.y; - } else { - return false; - } - } - - /** - * Punt naar String conversie - * @return Strin met waarde van x en y - */ - @Override - public String toString () { - return "(" + x + "," + y + ")"; - } -} |