-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.java
More file actions
148 lines (112 loc) · 5.62 KB
/
Test.java
File metadata and controls
148 lines (112 loc) · 5.62 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
package com.devoir.classes;
public class Test {
public static void objectEtudiant1() {
int notes[]= {7,8,9,5,6};
Etudiant et1= new Etudiant("2-8373-332", "Nom Et", "Prenom Et", "Adresse Et", "code-13", "Informatique", "3eme", notes);
float moy=et1.CalculMy();
String me=et1.getMention();
System.out.println("NIF :"+et1.getNif());
System.out.println("NOM :"+et1.getNif());
System.out.println("PRENOM :"+et1.getNif());
System.out.println("ADRESSE :"+et1.getNif());
System.out.println("CODE :"+et1.getCode());
System.out.println("OPTION :"+et1.getOption());
System.out.println("NIVEAU :"+et1.getNiveau());
System.out.println("ADRESSE :"+et1.getNif());
System.out.println("_____________________________________");
System.out.println("Voici les notes de l'Etudiant:");
for (int i = 0; i < et1.getNotes().length; i++) {
System.out.println(" Notes "+i+" ="+notes[i]);
}
System.out.println("Moyenne : "+moy+" / "+et1.getNotes().length*10);
System.out.println("Mention : "+me);
}
public static void objectEtudiant2() {
int notes[]= {4,5,6,1,3};
Etudiant et1= new Etudiant("2-8373-332", "Nom Et", "Prenom Et", "Adresse Et", "code-13", "Informatique", "3eme", notes);
float moy=et1.CalculMy();
String me=et1.getMention();
System.out.println("NIF :"+et1.getNif());
System.out.println("NOM :"+et1.getNif());
System.out.println("PRENOM :"+et1.getNif());
System.out.println("ADRESSE :"+et1.getNif());
System.out.println("CODE :"+et1.getCode());
System.out.println("OPTION :"+et1.getOption());
System.out.println("NIVEAU :"+et1.getNiveau());
System.out.println("ADRESSE :"+et1.getNif());
System.out.println("_____________________________________");
System.out.println("Voici les notes de l'Etudiant:");
for (int i = 0; i < et1.getNotes().length; i++) {
System.out.println(" Notes "+i+" ="+notes[i]);
}
System.out.println("Moyenne : "+moy+" / "+et1.getNotes().length*10);
System.out.println("Mention : "+me);
}
public static void objectEtudiant3() {
int notes[]= {10,8,10,9,6};
Etudiant et1= new Etudiant("2-8373-332", "Nom Et", "Prenom Et", "Adresse Et", "code-13", "Informatique", "3eme", notes);
float moy=et1.CalculMy();
String me=et1.getMention();
System.out.println("NIF :"+et1.getNif());
System.out.println("NOM :"+et1.getNif());
System.out.println("PRENOM :"+et1.getNif());
System.out.println("ADRESSE :"+et1.getNif());
System.out.println("CODE :"+et1.getCode());
System.out.println("OPTION :"+et1.getOption());
System.out.println("NIVEAU :"+et1.getNiveau());
System.out.println("ADRESSE :"+et1.getNif());
System.out.println("_____________________________________");
System.out.println("Voici les notes de l'Etudiant:");
for (int i = 0; i < et1.getNotes().length; i++) {
System.out.println(" Notes "+i+" ="+notes[i]);
}
System.out.println("Moyenne : "+moy+" / "+et1.getNotes().length*10);
System.out.println("Mention : "+me);
}
public static void objetProfesseur1() {
Professeur p1=new Professeur("789-233-1", "Jean", "Thomas", "Verrettes", "jean-3939", "Informatique", 13, 1000);
System.out.println("NIF :"+p1.getNif());
System.out.println("NOM :"+p1.getNom());
System.out.println("PRENOM :"+p1.getPrenom());
System.out.println("ADRESSE :"+p1.getAdresse());
System.out.println("CODE :"+p1.getCode());
System.out.println("TH :"+p1.getTaux());
System.out.println("NB HEURE :"+p1.getNh());
System.out.println("______________________________________________");
System.out.println("Ce professeur Enseigne la matiere "+p1.getCours());
System.out.println("IL Travaille "+p1.getNh()+" Heure (e) par semaine en raison de " +p1.getTaux()+" HTG par Heure");
System.out.println("Il a un salaire de "+p1.salaire()+" HTG");
System.out.println("Il a une deduction de "+p1.getDeduction()+" HTG comme taxe");
System.out.println("Son salaire net est "+p1.salaireNet()+" HTG en fin de compte");
System.out.println("Car une somme de "+p1.getDeduction()+" HTD a ete enleve sur son salaire.");
}
public static void objetProfesseur2() {
Professeur p1=new Professeur("789-233-7", "Jean", "Wilson", "Verrettes", "W-3939", "Comptable", 7, 750);
System.out.println("NIF :"+p1.getNif());
System.out.println("NOM :"+p1.getNom());
System.out.println("PRENOM :"+p1.getPrenom());
System.out.println("ADRESSE :"+p1.getAdresse());
System.out.println("CODE :"+p1.getCode());
System.out.println("TH :"+p1.getTaux());
System.out.println("NB HEURE :"+p1.getNh());
System.out.println("______________________________________________");
System.out.println("Ce professeur Enseigne la matiere "+p1.getCours());
System.out.println("IL Travaille "+p1.getNh()+" Heure (e) par semaine en raison de " +p1.getTaux()+" HTG par Heure");
System.out.println("Il a un salaire de "+p1.salaire()+" HTG");
System.out.println("Il a une deduction de "+p1.getDeduction()+" HTG comme taxe");
System.out.println("Son salaire net est "+p1.salaireNet()+" HTG en fin de compte");
System.out.println("Car une somme de "+p1.getDeduction()+" HTD a ete enleve sur son salaire.");
}
public static void AfficherProfesseurEtantQuePersonne() {
//Professeur p1=new Personne(nif, nom, prenom, adresse);
Professeur p1=new Professeur();
p1.setNif("426-244-4");
p1.setNom("Mackendy");
p1.setPrenom("Joseph");
p1.setAdresse("Port-au-prince");
System.out.println("NIF :"+p1.getNif());
System.out.println("NOM :"+p1.getNom());
System.out.println("PRENOM :"+p1.getPrenom());
System.out.println("ADRESSE :"+p1.getAdresse());
}
}