-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProfesseur.java
More file actions
105 lines (60 loc) · 1.42 KB
/
Professeur.java
File metadata and controls
105 lines (60 loc) · 1.42 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package com.devoir.classes;
public class Professeur extends Personne{
private String code;
private String cours;
private int Nh;
private double taux;
public Professeur() {
super();
// TODO Auto-generated constructor stub
}
public Professeur(String nif, String nom, String prenom, String adresse) {
super(nif, nom, prenom, adresse);
// TODO Auto-generated constructor stub
}
public Professeur(String nif, String nom, String prenom, String adresse, String code, String cours, int nh,
double taux) {
super(nif, nom, prenom, adresse);
this.code = code;
this.cours = cours;
Nh = nh;
this.taux = taux;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getCours() {
return cours;
}
public void setCours(String cours) {
this.cours = cours;
}
public int getNh() {
return Nh;
}
public void setNh(int nh) {
Nh = nh;
}
public double getTaux() {
return taux;
}
public void setTaux(double taux) {
this.taux = taux;
}
public double salaire() {
//calcul du salaire brut
return this.taux*this.Nh;
}
public double getDeduction() {
// Calcul de la deduction
double deduction_ona=this.salaire()*10/100;
double deduction_IRI=this.salaire()*7/100;
return deduction_IRI+deduction_ona;
}
public double salaireNet() {
return this.salaire()-this.getDeduction();
}
}