Start adding other classes
This commit is contained in:
parent
bc21cfd2aa
commit
9d43ce415b
5 changed files with 8 additions and 2 deletions
2
uml-poo/Apprenti.java
Normal file
2
uml-poo/Apprenti.java
Normal file
|
@ -0,0 +1,2 @@
|
|||
public class Apprenti extends Etudiant {
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
class Etudiant {
|
||||
public class Etudiant {
|
||||
// attributs
|
||||
private boolean apprenti;
|
||||
private String nom;
|
||||
|
|
2
uml-poo/ISalarie.java
Normal file
2
uml-poo/ISalarie.java
Normal file
|
@ -0,0 +1,2 @@
|
|||
public interface ISalarie {
|
||||
}
|
2
uml-poo/Prof.java
Normal file
2
uml-poo/Prof.java
Normal file
|
@ -0,0 +1,2 @@
|
|||
public class Prof implements ISalarie {
|
||||
}
|
|
@ -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é
|
||||
|
|
Loading…
Reference in a new issue