-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEtudiant.java
More file actions
64 lines (53 loc) · 1.14 KB
/
Etudiant.java
File metadata and controls
64 lines (53 loc) · 1.14 KB
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
package com.devoir.classes;
public class Etudiant extends Personne {
private String code;
private String option;
private String niveau;
private int notes[];
public Etudiant() {
super();
// TODO Auto-generated constructor stub
}
public Etudiant(String nif, String nom, String prenom, String adresse, String code, String option, String niveau,
int[] notes) {
super(nif, nom, prenom, adresse);
this.code = code;
this.option = option;
this.niveau = niveau;
this.notes = notes;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getOption() {
return option;
}
public void setOption(String option) {
this.option = option;
}
public String getNiveau() {
return niveau;
}
public void setNiveau(String niveau) {
this.niveau = niveau;
}
public int[] getNotes() {
return notes;
}
public void setNotes(int[] notes) {
this.notes = notes;
}
public float CalculMy() {
int somme=0;
for(int i=0;i<notes.length;i++) {
somme+=notes[i];
}
return somme;
}
public String getMention() {
return CalculMy() >=25 ? "Admis": "Echec";
}
}