Start adding other classes

This commit is contained in:
flyingscorpio@arch-desktop 2021-09-20 13:52:48 +02:00
parent bc21cfd2aa
commit 9d43ce415b
5 changed files with 8 additions and 2 deletions

2
uml-poo/Apprenti.java Normal file
View file

@ -0,0 +1,2 @@
public class Apprenti extends Etudiant {
}

View file

@ -1,4 +1,4 @@
class Etudiant {
public class Etudiant {
// attributs
private boolean apprenti;
private String nom;

2
uml-poo/ISalarie.java Normal file
View file

@ -0,0 +1,2 @@
public interface ISalarie {
}

2
uml-poo/Prof.java Normal file
View file

@ -0,0 +1,2 @@
public class Prof implements ISalarie {
}

View file

@ -1,4 +1,4 @@
class Main {
class Test {
public static void main(String[] ab) {
Etudiant e1 = new Etudiant("Dupond", true);
// e1.nom = "Efrei"; // ne compile pas car l'attribut est privé