11Fermer13
Pen^2Le 22/02/2007 à 20:09
voici ce que fait ton constructeur :

public CoursDonne (String sc,String sp,String g,String l,int hs)
{
    this.sigleCours=sc;
    this.sigleProf=sp;
    this.groupe=g;
    this.local=l;
    if (hs>=0 && hs<45)
        this.heureSemaine = hs;
    else
        System.err.println("heureSemaine invalide!!!!!!! ");
    System.exit(1);
} 



alors qu'il faudrait qu'il fasse :

public CoursDonne (String sc,String sp,String g,String l,int hs)
{
    this.sigleCours=sc;
    this.sigleProf=sp;
    this.groupe=g;
    this.local=l;
    if (hs>=0 && hs<45)
        this.heureSemaine = hs;
    else {
        System.err.println("heureSemaine invalide!!!!!!! ");
        System.exit(1);
    }
} 




wink (ça quittait dans tous les cas avec le System.exit(1))