-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.java
More file actions
41 lines (34 loc) · 1.02 KB
/
App.java
File metadata and controls
41 lines (34 loc) · 1.02 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
package com.devoir.classes;
import java.util.Scanner;
public class App {
public static void main(String[] args) {
for (;;) {
System.out.println("EXERCICE DE CLASSE\n___________________________________________");
System.out.println("1- Afficher les trois objets Etudaint");
System.out.println("2- Afficher les deux objets Professeur");
System.out.println("3- Afficher un professeur etant que personne");
switch (new Scanner(System.in).nextInt()) {
case 1:
Test.objectEtudiant1();
System.out.println("\n\n");
Test.objectEtudiant2();
System.out.println("\n\n");
Test.objectEtudiant3();
System.out.println("\n\n");
break;
case 2:
Test.objetProfesseur1();
System.out.println("\n\n");
Test.objetProfesseur2();
System.out.println("\n\n");
break;
case 3:
Test.AfficherProfesseurEtantQuePersonne();
System.out.println("\n\n");
break;
default:
throw new IllegalArgumentException("Mauvaise valeur de " + new Scanner(System.in).nextInt());
}
}
}
}