Update DEV.2.1/TP/TP4-ClassesetObjet/Periode.java
This commit is contained in:
@@ -22,7 +22,7 @@ public class Periode {
|
||||
return String.format("%04d-%02d-%02d - %04d-%02d-%02d", annee_deb, mois_deb, jour_deb, annee_fin, mois_fin, jour_fin);
|
||||
}
|
||||
|
||||
public Periode periode_plus() {
|
||||
public Periode periodePlus() {
|
||||
int newJour_fin = this.jour_fin + 1;
|
||||
int newMois_fin = this.mois_fin;
|
||||
int newAnnee_fin = this.annee_fin;
|
||||
@@ -38,7 +38,13 @@ public class Periode {
|
||||
}
|
||||
|
||||
public int nb_jour(int periode) {
|
||||
|
||||
if (this.annee_deb == this.annee_fin) {
|
||||
if (this.mois_deb == this.mois_fin) {
|
||||
if (this.jour_deb < jour_fin) {
|
||||
per
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
@@ -46,7 +52,8 @@ public class Periode {
|
||||
Periode periode_plus = vacances.periode_plus();
|
||||
|
||||
System.out.println("Votre période est de " + vacances);
|
||||
System.out.println("Voici votre période prolongé : " + );
|
||||
System.out.println("Voici votre période prolongé : " + vacances.periode_plus());
|
||||
System.out.println("Voici la durée en jour de votre période : " + periode);
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user