From fa6f4b2fd6160609f1a790d7344684fff507a5f1 Mon Sep 17 00:00:00 2001 From: Xiway Date: Thu, 23 Apr 2015 15:17:19 +0200 Subject: [PATCH 1/8] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a567783..59be828 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ # Projet_Java Projet de java IGI452 2015 Heheee +874848 From d8902f38ab8ea2ea6d7243651276c16c821284b6 Mon Sep 17 00:00:00 2001 From: Rama Date: Thu, 23 Apr 2015 15:52:25 +0200 Subject: [PATCH 2/8] main test --- src/main.java | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/main.java b/src/main.java index 665eca8..df0d1e5 100644 --- a/src/main.java +++ b/src/main.java @@ -1,4 +1,22 @@ public class main { - + static public void main(String [] args){ + Velo v1 = new Velo(28,02,2015,11,30,100,90, 120); +// v1.affiche(); + + Course c1 = new Course(1,03,2015,20,00,10,180, "Montagne", "Pluie"); +// c1.affiche(); + + Course c2 = new Course(3,05,2015,06,30,20,300,"Plage", "Soleil"); + + Agenda MyAgenda = new Agenda(); + MyAgenda.add(c1); + MyAgenda.add(v1); + MyAgenda.add(c2); + + MyAgenda.affiche(1); + MyAgenda.longueseance().affiche(); + MyAgenda.courteseance().affiche(); + MyAgenda.distanceDsplne("course"); + } } From 44c24e404967aacaf5035178ba60a416b152fb2f Mon Sep 17 00:00:00 2001 From: Rama Date: Thu, 23 Apr 2015 16:00:31 +0200 Subject: [PATCH 3/8] TrainingEvent --- src/NewTrainingEvent.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/NewTrainingEvent.java diff --git a/src/NewTrainingEvent.java b/src/NewTrainingEvent.java new file mode 100644 index 0000000..864c098 --- /dev/null +++ b/src/NewTrainingEvent.java @@ -0,0 +1,18 @@ +import java.util.EventObject; +import java.util.GregorianCalendar; + +public class NewTrainingEvent extends EventObject { + + private GregorianCalendar date; + private String nom_sportif; + private int Creneau; + + public NewTrainingEvent(Object arg0, GregorianCalendar date, String nom_sportif, int Creneau){ + super(arg0); + + this.date = date; + this.nom_sportif = nom_sportif; + this.Creneau = Creneau; + } + +} From 1cb7f4a8705652599e846f4fd2b0288a3b043421 Mon Sep 17 00:00:00 2001 From: Rama Date: Thu, 23 Apr 2015 16:23:25 +0200 Subject: [PATCH 4/8] natation et event --- src/Natation.java | 52 +++++++++++++++++++++++++++++++++++++++ src/NewTrainingEvent.java | 2 +- src/main.java | 5 +++- 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 src/Natation.java diff --git a/src/Natation.java b/src/Natation.java new file mode 100644 index 0000000..9407570 --- /dev/null +++ b/src/Natation.java @@ -0,0 +1,52 @@ +import java.util.GregorianCalendar; + + +public class Natation extends Séance { + private GregorianCalendar date; + int duree; + private String Type = "Natation"; + private int distance; + String _n = System.getProperty("line.separator"); + + public Natation(int jour, int mois, int annee, int heure, int minute){ + date = new GregorianCalendar(annee, mois, jour, heure, minute, 0 ); + } + public Natation(int jour, int mois, int annee, int heure, int minute, int duree, int distance){ + this(jour, mois, annee, heure, minute); + this.duree = duree; + this.distance = distance; + } + + @Override + void affiche() { + // TODO Auto-generated method stub + System.out.println(_n+ "Séance du " + this.date.get(GregorianCalendar.DAY_OF_MONTH) + "/" + this.date.get(GregorianCalendar.MONTH) + "/"+ this.date.get(GregorianCalendar.YEAR) +" de Natation :" + _n ); + System.out.println("Duree totale : "+ this.duree + " minutes" +_n + "Vous avez parcouru : "+ this.distance + " m en nage." + _n); + } + + @Override + int getDuree() { + // TODO Auto-generated method stub + return this.duree; + } + + @Override + int getDistance() { + // TODO Auto-generated method stub + return this.distance; + } + + @Override + String getType() { + // TODO Auto-generated method stub + return this.Type; + } + + @Override + GregorianCalendar getDate() { + // TODO Auto-generated method stub + return this.date; + } + + +} diff --git a/src/NewTrainingEvent.java b/src/NewTrainingEvent.java index 864c098..ab45f30 100644 --- a/src/NewTrainingEvent.java +++ b/src/NewTrainingEvent.java @@ -8,8 +8,8 @@ public class NewTrainingEvent extends EventObject { private int Creneau; public NewTrainingEvent(Object arg0, GregorianCalendar date, String nom_sportif, int Creneau){ - super(arg0); + super(arg0); this.date = date; this.nom_sportif = nom_sportif; this.Creneau = Creneau; diff --git a/src/main.java b/src/main.java index df0d1e5..d1fb6e2 100644 --- a/src/main.java +++ b/src/main.java @@ -8,7 +8,10 @@ static public void main(String [] args){ // c1.affiche(); Course c2 = new Course(3,05,2015,06,30,20,300,"Plage", "Soleil"); - + + Natation n1 = new Natation(24,04,2015,8,50,60,900); + n1.affiche(); + Agenda MyAgenda = new Agenda(); MyAgenda.add(c1); MyAgenda.add(v1); From a8e1c1c894012d4b3d900b813820165342cce358 Mon Sep 17 00:00:00 2001 From: Rama Date: Thu, 7 May 2015 08:08:04 +0200 Subject: [PATCH 5/8] Revert "natation et event" This reverts commit 1cb7f4a8705652599e846f4fd2b0288a3b043421. --- src/Natation.java | 52 --------------------------------------- src/NewTrainingEvent.java | 2 +- src/main.java | 5 +--- 3 files changed, 2 insertions(+), 57 deletions(-) delete mode 100644 src/Natation.java diff --git a/src/Natation.java b/src/Natation.java deleted file mode 100644 index 9407570..0000000 --- a/src/Natation.java +++ /dev/null @@ -1,52 +0,0 @@ -import java.util.GregorianCalendar; - - -public class Natation extends Séance { - private GregorianCalendar date; - int duree; - private String Type = "Natation"; - private int distance; - String _n = System.getProperty("line.separator"); - - public Natation(int jour, int mois, int annee, int heure, int minute){ - date = new GregorianCalendar(annee, mois, jour, heure, minute, 0 ); - } - public Natation(int jour, int mois, int annee, int heure, int minute, int duree, int distance){ - this(jour, mois, annee, heure, minute); - this.duree = duree; - this.distance = distance; - } - - @Override - void affiche() { - // TODO Auto-generated method stub - System.out.println(_n+ "Séance du " + this.date.get(GregorianCalendar.DAY_OF_MONTH) + "/" + this.date.get(GregorianCalendar.MONTH) + "/"+ this.date.get(GregorianCalendar.YEAR) +" de Natation :" + _n ); - System.out.println("Duree totale : "+ this.duree + " minutes" +_n + "Vous avez parcouru : "+ this.distance + " m en nage." + _n); - } - - @Override - int getDuree() { - // TODO Auto-generated method stub - return this.duree; - } - - @Override - int getDistance() { - // TODO Auto-generated method stub - return this.distance; - } - - @Override - String getType() { - // TODO Auto-generated method stub - return this.Type; - } - - @Override - GregorianCalendar getDate() { - // TODO Auto-generated method stub - return this.date; - } - - -} diff --git a/src/NewTrainingEvent.java b/src/NewTrainingEvent.java index ab45f30..864c098 100644 --- a/src/NewTrainingEvent.java +++ b/src/NewTrainingEvent.java @@ -8,8 +8,8 @@ public class NewTrainingEvent extends EventObject { private int Creneau; public NewTrainingEvent(Object arg0, GregorianCalendar date, String nom_sportif, int Creneau){ - super(arg0); + this.date = date; this.nom_sportif = nom_sportif; this.Creneau = Creneau; diff --git a/src/main.java b/src/main.java index d1fb6e2..df0d1e5 100644 --- a/src/main.java +++ b/src/main.java @@ -8,10 +8,7 @@ static public void main(String [] args){ // c1.affiche(); Course c2 = new Course(3,05,2015,06,30,20,300,"Plage", "Soleil"); - - Natation n1 = new Natation(24,04,2015,8,50,60,900); - n1.affiche(); - + Agenda MyAgenda = new Agenda(); MyAgenda.add(c1); MyAgenda.add(v1); From 36c82e7b81d6b3169b2e236a9350ec2030db9bd0 Mon Sep 17 00:00:00 2001 From: Xiway Date: Thu, 7 May 2015 08:50:45 +0200 Subject: [PATCH 6/8] Create Natation.JAVA --- Natation.JAVA | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Natation.JAVA diff --git a/Natation.JAVA b/Natation.JAVA new file mode 100644 index 0000000..776ef68 --- /dev/null +++ b/Natation.JAVA @@ -0,0 +1,52 @@ +public class Natation extends Séance { + private GregorianCalendar date; + int duree; + private String Type = ""; + private int distance; + String _n = System.getProperty("line.separator"); + + public Natation(int jour, int mois, int annee, int heure, int minute){ + date = new GregorianCalendar(annee, mois, jour, heure, minute, 0 ); + } + public Natation(int jour, int mois, int annee, int heure, int minute, int duree, int distance){ + this(jour, mois, annee, heure, minute); + this.duree = duree; + this.distance = distance; + } + + + public GregorianCalendar getDate() { + return date; + } + public void setDate(GregorianCalendar date) { + this.date = date; + } + + public int getDuree() { + return duree; + } + public void setDuree(int duree) { + this.duree = duree; + } + public int getDistance() { + return distance; + } + public void setDistance(int distance) { + this.distance = distance; + } + public String getType() { + return Type; + } + public void setType(String type) { + Type = type; + } + + public void affiche(){ + // Je te laisse t'occuper de l'affichage de la date System.out.println("Séance du " + this.date.get(GregorianCalendar.DAY_OF_MONTH) + "/" + this.date.get(GregorianCalendar.MONTH) + "/"+ this.date.get(GregorianCalendar.YEAR) +" de type natation :"); + System.out.println("Distance totale parcourue : "+this.distance+" m."); + System.out.println("Duree : "+this.duree + " minutes."); + System.out.println("Type de nage : "+this.Type+"."); + } + + +} From 306e70354b4aa578e3744babacfcec692c3b84b2 Mon Sep 17 00:00:00 2001 From: Ichinin Date: Thu, 7 May 2015 09:03:54 +0200 Subject: [PATCH 7/8] delete error .JAVA --- Natation.JAVA | 52 --------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 Natation.JAVA diff --git a/Natation.JAVA b/Natation.JAVA deleted file mode 100644 index 776ef68..0000000 --- a/Natation.JAVA +++ /dev/null @@ -1,52 +0,0 @@ -public class Natation extends Séance { - private GregorianCalendar date; - int duree; - private String Type = ""; - private int distance; - String _n = System.getProperty("line.separator"); - - public Natation(int jour, int mois, int annee, int heure, int minute){ - date = new GregorianCalendar(annee, mois, jour, heure, minute, 0 ); - } - public Natation(int jour, int mois, int annee, int heure, int minute, int duree, int distance){ - this(jour, mois, annee, heure, minute); - this.duree = duree; - this.distance = distance; - } - - - public GregorianCalendar getDate() { - return date; - } - public void setDate(GregorianCalendar date) { - this.date = date; - } - - public int getDuree() { - return duree; - } - public void setDuree(int duree) { - this.duree = duree; - } - public int getDistance() { - return distance; - } - public void setDistance(int distance) { - this.distance = distance; - } - public String getType() { - return Type; - } - public void setType(String type) { - Type = type; - } - - public void affiche(){ - // Je te laisse t'occuper de l'affichage de la date System.out.println("Séance du " + this.date.get(GregorianCalendar.DAY_OF_MONTH) + "/" + this.date.get(GregorianCalendar.MONTH) + "/"+ this.date.get(GregorianCalendar.YEAR) +" de type natation :"); - System.out.println("Distance totale parcourue : "+this.distance+" m."); - System.out.println("Duree : "+this.duree + " minutes."); - System.out.println("Type de nage : "+this.Type+"."); - } - - -} From af4e1ced8077d93936bce7bd90d9a83ea8adb30e Mon Sep 17 00:00:00 2001 From: Ichinin Date: Sat, 9 May 2015 17:19:38 +0200 Subject: [PATCH 8/8] Delete README.md --- README.md | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index 59be828..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Projet_Java -Projet de java IGI452 2015 -Heheee -874848