repositories
/
TP_POO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TP2: Use a Compactable array for testing purpose.
[TP_POO.git]
/
TP2
/
Point.java
diff --git
a/TP2/Point.java
b/TP2/Point.java
index e949acc413fbe8f4947a04bd1fc3fdc3dc75df9b..5a591c6e03049979f35547329becc0bf246f1bd0 100644
(file)
--- a/
TP2/Point.java
+++ b/
TP2/Point.java
@@
-4,6
+4,9
@@
class Point {
private double y;
Point() {
private double y;
Point() {
+ /*
+ * FIXME: init to (0,0)?
+ */
}
Point (double x, double y) {
}
Point (double x, double y) {
@@
-27,8
+30,9
@@
class Point {
return y;
}
return y;
}
- public Point additionner(Point p1) {
- return new Point(p1.getX() + getX(), p1.getY() + getX());
+ public Point additionner(Point p) {
+ Point pNew = new Point(p.getX() + getX(), p.getY() + getY());
+ return pNew;
}
public String toString() {
}
public String toString() {