1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
class TestDuree {
public static void main(String args []){
Duree a =new Duree(12);
a.conversion(100);
System.out.println(" La conversion est de" + "afficher la valeur de retour
de la methode conversion);
}
}
public class Duree {
int h;
int m;
int s;
int valeurdecimale;
int tempstotal;
public Duree(double dureeheure){
this.h=h;
}
public Duree(int h, int m, int s){
this.h=h;
this.m=m;
this.s=s;
}
public int getDec(){
return valeurdecimale;
}
public int getH(){
int h;
h=m/60;
return h;
}
public int getM(){
int m;
m=s/60;
return m;
}
public int getS(){
int s;
s=m*60;
return s;
}
public int Durééaddition(Duree d){
int test=5;
return (test);
}
public static int Duréeaddition(Duree d){
int test=5;
return(test);
}
public int conversion(int tempstotal){
int h=(tempstotal/3600);
int m=(tempstotal-3600*h)/60;
int s=(tempstotal-3600-60*m);
int conv=h+m+s;
return (conv);
}
} |
Partager