repositories
/
TP_POO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Create a generic Node class and make use of it.
[TP_POO.git]
/
TP2
/
Forme.java
diff --git
a/TP2/Forme.java
b/TP2/Forme.java
index df9fc4434f94fbda3504828594ff63e8ddc7ec26..cdef6b5da1443e4c3ebc9c579fbd48c7956050f2 100644
(file)
--- a/
TP2/Forme.java
+++ b/
TP2/Forme.java
@@
-1,7
+1,26
@@
-abstract class Forme {
+@ClassPreamble (
+ author = "Jérôme Benoit",
+ date = "11/17/2008"
+)
+public abstract class Forme implements Affichable {
+ private Point pOri;
- abstract public void dessiner(Piletransformations pile);
- abstract public void deplacer(Point p);
+ public abstract void dessiner(Piletransformations pile);
+ Forme() {
+ pOri = new Point();
+ }
+
+ Forme(Point p) {
+ pOri = p;
+ }
+
+ public Point getpOri() {
+ return pOri;
+ }
+
+ public void deplacer(Point p) {
+ pOri = pOri.additionner(p);
+ }
}
}