repositories
/
TP_POO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Code cleanup.
[TP_POO.git]
/
TP2
/
Point.java
diff --git
a/TP2/Point.java
b/TP2/Point.java
index e949acc413fbe8f4947a04bd1fc3fdc3dc75df9b..89382d521e57f9bc6479bc0006a69d9c10eaf961 100644
(file)
--- a/
TP2/Point.java
+++ b/
TP2/Point.java
@@
-1,9
+1,16
@@
+@ClassPreamble (
+ author = "Jérôme Benoit",
+ date = "11/02/2012"
+)
class Point {
private double x;
private double y;
Point() {
class Point {
private double x;
private double y;
Point() {
+ /*
+ * FIXME?: init to (0,0)
+ */
}
Point (double x, double y) {
}
Point (double x, double y) {
@@
-27,8
+34,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() {