Fill java classes a bit
This commit is contained in:
parent
9d43ce415b
commit
2102b0c062
5 changed files with 37 additions and 8 deletions
|
@ -1,2 +1,23 @@
|
|||
public class Apprenti extends Etudiant {
|
||||
public class Apprenti extends Etudiant implements ISalarie {
|
||||
String entreprise = "Efrei";
|
||||
double salaire = 21000;
|
||||
|
||||
public Apprenti(String nom, String promo, double salaire) {
|
||||
super(promo, nom, true);
|
||||
this.salaire = salaire;
|
||||
}
|
||||
|
||||
public double getSalaire() {
|
||||
return this.salaire;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeContrat() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isApprenti() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
public class Etudiant {
|
||||
// attributs
|
||||
private boolean apprenti;
|
||||
private boolean apprenti = false;
|
||||
private String nom;
|
||||
public String promo;
|
||||
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
public interface ISalarie {
|
||||
public double getSalaire();
|
||||
public String getTypeContrat();
|
||||
}
|
||||
|
|
|
@ -1,2 +1,8 @@
|
|||
public class Prof implements ISalarie {
|
||||
public double getSalaire() {
|
||||
return 30000;
|
||||
}
|
||||
public String getTypeContrat() {
|
||||
return "CDI";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<XMI xmi.version="1.2" timestamp="2021-09-20T13:36:34" verified="false" xmlns:UML="http://schema.omg.org/spec/UML/1.4">
|
||||
<XMI xmi.version="1.2" timestamp="2021-09-20T14:16:34" verified="false" xmlns:UML="http://schema.omg.org/spec/UML/1.4">
|
||||
<XMI.header>
|
||||
<XMI.documentation>
|
||||
<XMI.exporter>umbrello uml modeller 2.32.1 http://umbrello.kde.org</XMI.exporter>
|
||||
|
@ -115,7 +115,7 @@
|
|||
</UML:GeneralizableElement.generalization>
|
||||
</UML:Class>
|
||||
<UML:Generalization isSpecification="false" xmi.id="u2FIP6FDcPU5j" name="" namespace="Logical_View" visibility="public" discriminator="" child="urwHufhFF4vLp" parent="uM9WbW5m0wVLC"/>
|
||||
<UML:Interface isSpecification="false" isLeaf="false" isRoot="false" isAbstract="true" xmi.id="u9AwXkK2bqFjG" name="Salarie" namespace="Logical_View" visibility="public" stereotype="interface">
|
||||
<UML:Interface isSpecification="false" isLeaf="false" isRoot="false" isAbstract="true" xmi.id="u9AwXkK2bqFjG" name="ISalarie" namespace="Logical_View" visibility="public" stereotype="interface">
|
||||
<UML:Classifier.feature>
|
||||
<UML:Operation isSpecification="false" isLeaf="false" isRoot="false" isAbstract="true" xmi.id="ul1LOkswo8EjV" name="getSalaire" visibility="public" isQuery="false" isOverride="false" isVirtual="true" isInline="false">
|
||||
<UML:BehavioralFeature.parameter>
|
||||
|
@ -247,6 +247,10 @@
|
|||
<listitem id="uZVQJH4ROhKCy" type="813" open="1"/>
|
||||
<listitem id="uM9WbW5m0wVLC" type="813" open="1"/>
|
||||
<listitem id="urwHufhFF4vLp" type="813" open="1"/>
|
||||
<listitem id="u9AwXkK2bqFjG" type="817" open="1">
|
||||
<listitem id="ul1LOkswo8EjV" type="815" open="0"/>
|
||||
<listitem id="uVwImXLLmsxyg" type="815" open="0"/>
|
||||
</listitem>
|
||||
<listitem id="uTF86nYfnsaSR" type="813" open="1">
|
||||
<listitem id="uoEFWC2wXflye" type="814" open="0"/>
|
||||
<listitem id="uQOn3ypA6tiGz" type="814" open="0"/>
|
||||
|
@ -256,10 +260,6 @@
|
|||
<listitem id="ucPu7IeMrTnan" type="814" open="0"/>
|
||||
<listitem id="uwqOVb1yoeRTp" type="815" open="0"/>
|
||||
</listitem>
|
||||
<listitem id="u9AwXkK2bqFjG" type="817" open="1">
|
||||
<listitem id="ul1LOkswo8EjV" type="815" open="0"/>
|
||||
<listitem id="uVwImXLLmsxyg" type="815" open="0"/>
|
||||
</listitem>
|
||||
<listitem id="uqNYPiD6SISla" type="813" open="1"/>
|
||||
</listitem>
|
||||
<listitem id="Use_Case_View" type="802" open="1"/>
|
||||
|
|
Loading…
Reference in a new issue