modif estetique et correction de bug
This commit is contained in:
@@ -18,21 +18,19 @@ public class EtudiantNP implements Etudiant{
|
||||
Objects.requireNonNull(nom,"On ne peut pas créer un étudiant avec un nom null");
|
||||
Objects.requireNonNull(prenom,"On ne peut pas créer un étudiant avec un nom null");
|
||||
// auto incrément de l'id
|
||||
this.id=this.nextId+1;
|
||||
this.nextId++;
|
||||
this.id=++this.nextId;
|
||||
this.nom=nom;
|
||||
this.prenom=prenom;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructeur.
|
||||
* Constructeur pour MPN
|
||||
*/
|
||||
public EtudiantNP(String nom, String prenom, int id){
|
||||
Objects.requireNonNull(nom,"On ne peut pas créer un étudiant avec un nom null");
|
||||
Objects.requireNonNull(prenom,"On ne peut pas créer un étudiant avec un nom null");
|
||||
// auto incrément de l'id
|
||||
this.id=id;
|
||||
this.nextId++;
|
||||
this.id=id;
|
||||
this.nom=nom;
|
||||
this.prenom=prenom;
|
||||
}
|
||||
|
Reference in New Issue
Block a user