Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions README.md

This file was deleted.

58 changes: 58 additions & 0 deletions src/Natation.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import java.util.GregorianCalendar;


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+".");
}


}