-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEtudiant.java
88 lines (72 loc) · 1.76 KB
/
Etudiant.java
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
package ecole.etudiant;
public class Etudiant {
private int id;
private String nom;
private String prenom;
private float moy;
private int absence;
private String ecole;
public Etudiant(int id,String nom,String prenom,float moy,int absence,String ecole)
{
this.id=id;
this.nom=nom;
this.prenom=prenom;
this.moy=moy;
this.absence=absence;
this.ecole=ecole;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNom(){
return nom;
}
public void setNom(){
this.nom=nom;
}
public void setNom(String nom) {
this.nom = nom;
}
public String getPrenom() {
return prenom;
}
public void setPrenom(String prenom) {
this.prenom = prenom;
}
public float getMoy() {
return moy;
}
public String getEcole(){
return ecole;
}
public void setEcole(String ecole){
this.ecole=ecole;
}
public void setMoy(float moy) {
this.moy = moy;
}
public int getAbsence(){
return absence;
}
public void setAbsence(int absence){
this.absence=absence;
}
public boolean equals(Object o){
if(o instanceof Etudiant){
Etudiant e=(Etudiant)o;
return (this.id==e.id && this.nom.equals(e.nom));
}
return false;
}
public String toString(){
return "Etudiant {" +
"ID='" + id + '\''+
",Nom='" + nom +'\''+
",Prenom='" + prenom +'\''+
",moy='" + moy +'\''+
'}';
}
}