Code-Verbesserung
parent
8006b66f42
commit
55934bacfe
|
@ -1,11 +1,11 @@
|
||||||
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36" version="24.8.6">
|
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36" version="24.8.6">
|
||||||
<diagram name="Seite-1" id="xkmZ0K6vz5A5_BixXH1Q">
|
<diagram name="Seite-1" id="xkmZ0K6vz5A5_BixXH1Q">
|
||||||
<mxGraphModel dx="1447" dy="1489" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
<mxGraphModel dx="1873" dy="1415" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||||
<root>
|
<root>
|
||||||
<mxCell id="0" />
|
<mxCell id="0" />
|
||||||
<mxCell id="1" parent="0" />
|
<mxCell id="1" parent="0" />
|
||||||
<mxCell id="xSOr38UQ6ttjsq0tnJFV-13" value="" style="shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;html=1;whiteSpace=wrap;" vertex="1" parent="1">
|
<mxCell id="l42d9aidsTNYsLyE-SN_-16" value="" style="shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;html=1;whiteSpace=wrap;" vertex="1" parent="1">
|
||||||
<mxGeometry x="750" y="260" width="1590" height="1250" as="geometry" />
|
<mxGeometry x="750" y="260" width="1580" height="1340" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<object label="" TUI="" id="ydUtLetK26WXyeJ3qCt--1">
|
<object label="" TUI="" id="ydUtLetK26WXyeJ3qCt--1">
|
||||||
<mxCell style="shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;html=1;whiteSpace=wrap;points=[[0,0,0,-5,-13],[0,0,0,0,14],[0,0,0,0,78],[0,0,0,0,142],[0,0,0,0,206],[0,0,0,0,270],[0,0,0,20,0],[0,0,0,40,0],[0,0,0,160,14],[0,0,0,280,14],[0,0,0,280,78],[0,0,0,280,142],[0,0,0,280,206],[0,0,0,280,270],[0,0.5,0,0,0],[0.04,0.02,0,0,0],[0.06,0.04,0,0,0],[0.09,0.03,0,0,0],[0.13,0.04,0,0,0],[0.25,1,0,0,0],[0.5,1,0,0,0],[0.75,1,0,0,0]];" parent="1" vertex="1">
|
<mxCell style="shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;html=1;whiteSpace=wrap;points=[[0,0,0,-5,-13],[0,0,0,0,14],[0,0,0,0,78],[0,0,0,0,142],[0,0,0,0,206],[0,0,0,0,270],[0,0,0,20,0],[0,0,0,40,0],[0,0,0,160,14],[0,0,0,280,14],[0,0,0,280,78],[0,0,0,280,142],[0,0,0,280,206],[0,0,0,280,270],[0,0.5,0,0,0],[0.04,0.02,0,0,0],[0.06,0.04,0,0,0],[0.09,0.03,0,0,0],[0.13,0.04,0,0,0],[0.25,1,0,0,0],[0.5,1,0,0,0],[0.75,1,0,0,0]];" parent="1" vertex="1">
|
||||||
|
@ -238,13 +238,13 @@
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--175" value="<i>Benutzer</i>" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=37;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;strokeColor=default;spacingTop=10;fontFamily=Helvetica;fontSize=12;fontColor=default;fillColor=default;" parent="1" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--175" value="<i>Benutzer</i>" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=37;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;strokeColor=default;spacingTop=10;fontFamily=Helvetica;fontSize=12;fontColor=default;fillColor=default;" parent="1" vertex="1">
|
||||||
<mxGeometry x="1470" y="1010" width="260" height="320" as="geometry" />
|
<mxGeometry x="1470" y="1010" width="260" height="320" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--176" value="<span style="font-weight: normal;">- bibAusweis: Ausweis</span><div style="line-height: 140%;"><span style="background-color: initial; font-weight: normal;">- name: String</span></div><div style="line-height: 140%;"><span style="background-color: initial; font-weight: normal;">- alter: int</span></div><div style="line-height: 140%;"><span style="background-color: initial; font-weight: normal;">- istStudent: boolean</span></div><div style="line-height: 160%;"><span style="font-weight: normal;">-&nbsp;<span style="background-color: initial;">ausgeliehenenMedien[]: Medium</span></span></div><div><span style="font-weight: normal;">- angemeldet: boolean</span></div><div><span style="font-weight: normal;">- gebühren: double</span></div><div><span style="font-weight: normal;">- anmeldeBeginn: LocalDate</span></div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="ydUtLetK26WXyeJ3qCt--175" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--176" value="<span style="font-weight: normal;">- bibAusweis: Ausweis</span><div style="line-height: 140%;"><span style="background-color: initial; font-weight: normal;">- name: String</span></div><div style="line-height: 140%;"><span style="background-color: initial; font-weight: normal;">- alter: int</span></div><div style="line-height: 140%;"><span style="background-color: initial; font-weight: normal;">- istStudent: boolean</span></div><div style="line-height: 160%;"><span style="font-weight: normal;">-&nbsp;<span style="background-color: initial;">ausgeliehenenMedien[]: Ausleihe</span></span></div><div><span style="font-weight: normal;">- angemeldet: boolean</span></div><div><span style="font-weight: normal;">- gebühren: double</span></div><div><span style="font-weight: normal;">- anmeldeBeginn: LocalDate</span></div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="ydUtLetK26WXyeJ3qCt--175" vertex="1">
|
||||||
<mxGeometry y="37" width="260" height="163" as="geometry" />
|
<mxGeometry y="37" width="260" height="163" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--177" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="ydUtLetK26WXyeJ3qCt--175" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--177" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="ydUtLetK26WXyeJ3qCt--175" vertex="1">
|
||||||
<mxGeometry y="200" width="260" height="8" as="geometry" />
|
<mxGeometry y="200" width="260" height="8" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--178" value="<span style="font-weight: normal;">+ anmelden(): void</span><div><span style="font-weight: 400;">+ abmelden: void<br></span><div><span style="font-weight: normal;">+ ausleihen(medium: Ausleihe): void</span></div><div><span style="font-weight: normal; background-color: initial;">+ jahresgebühren(): double</span></div><div><span style="font-weight: normal;">+ zurückgeben(medium: Ausleihe): void</span></div><div><span style="font-weight: normal;">+ gebührenbezahlen(int betrag): boolean</span></div></div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="ydUtLetK26WXyeJ3qCt--175" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--178" value="<span style="font-weight: normal;">+ anmelden(): void</span><div><span style="font-weight: 400;">+ abmelden: void<br></span><div><span style="font-weight: normal;">+ ausleihen(medium: Ausleihe): void</span></div><div><span style="font-weight: normal; background-color: initial;"><i>+ jahresgebühren(): double</i></span></div><div><span style="font-weight: normal;">+ zurückgeben(medium: Ausleihe): void</span></div><div><br></div></div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="ydUtLetK26WXyeJ3qCt--175" vertex="1">
|
||||||
<mxGeometry y="208" width="260" height="112" as="geometry" />
|
<mxGeometry y="208" width="260" height="112" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--203" value="" style="endArrow=none;html=1;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" edge="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--203" value="" style="endArrow=none;html=1;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" edge="1">
|
||||||
|
@ -286,16 +286,6 @@
|
||||||
<mxCell id="i-RIzz4hhB1Q3m7lVkjo-5" value="+ userRegistrieren(name:String, type: String, alter: int, istAdmin: String): void<div>+ userAnmelden(bibKartennummer: String): boolean</div><div>+&nbsp;mediumDurchsuchen(auswahl: String, bibKartennummer: String): ArrayList&lt;String&gt;</div><div>+&nbsp;mediumAusleihen(bibKartenNummer:&nbsp;<span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">,eindeutigeKennung:&nbsp;</span><span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">): String</span></div><div><span style="background-color: initial;">+&nbsp;</span><span style="background-color: initial;">medienVerlängern(eindeutigeKennung:</span><span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">, bibKartennummer:&nbsp;</span><span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">): boolean</span></div><div><span style="background-color: initial;">+&nbsp;</span><span style="background-color: initial;">gebührenBezahlen(betrag:&nbsp;</span><span style="background-color: initial;">double</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">, bibKartennummer:&nbsp;</span><span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">): boolean</span></div><div><span style="background-color: initial;">+&nbsp;</span><span style="background-color: initial;">medienRückgabe(eindeutigeKennung:&nbsp;</span><span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">): ArrayList&lt;String&gt;</span></div><div><span style="background-color: initial;">+&nbsp;</span><span style="background-color: initial;">jahresGebührenBerechnen(bibKartennummer:&nbsp;</span><span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">, datum:&nbsp;</span><span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">): double</span></div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="i-RIzz4hhB1Q3m7lVkjo-2" vertex="1">
|
<mxCell id="i-RIzz4hhB1Q3m7lVkjo-5" value="+ userRegistrieren(name:String, type: String, alter: int, istAdmin: String): void<div>+ userAnmelden(bibKartennummer: String): boolean</div><div>+&nbsp;mediumDurchsuchen(auswahl: String, bibKartennummer: String): ArrayList&lt;String&gt;</div><div>+&nbsp;mediumAusleihen(bibKartenNummer:&nbsp;<span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">,eindeutigeKennung:&nbsp;</span><span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">): String</span></div><div><span style="background-color: initial;">+&nbsp;</span><span style="background-color: initial;">medienVerlängern(eindeutigeKennung:</span><span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">, bibKartennummer:&nbsp;</span><span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">): boolean</span></div><div><span style="background-color: initial;">+&nbsp;</span><span style="background-color: initial;">gebührenBezahlen(betrag:&nbsp;</span><span style="background-color: initial;">double</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">, bibKartennummer:&nbsp;</span><span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">): boolean</span></div><div><span style="background-color: initial;">+&nbsp;</span><span style="background-color: initial;">medienRückgabe(eindeutigeKennung:&nbsp;</span><span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">): ArrayList&lt;String&gt;</span></div><div><span style="background-color: initial;">+&nbsp;</span><span style="background-color: initial;">jahresGebührenBerechnen(bibKartennummer:&nbsp;</span><span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">, datum:&nbsp;</span><span style="background-color: initial;">String</span><span style="background-color: initial;">&nbsp;</span><span style="background-color: initial;">): double</span></div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="i-RIzz4hhB1Q3m7lVkjo-2" vertex="1">
|
||||||
<mxGeometry y="138" width="490" height="142" as="geometry" />
|
<mxGeometry y="138" width="490" height="142" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="i-RIzz4hhB1Q3m7lVkjo-9" value="1" style="endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;rounded=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" edge="1">
|
|
||||||
<mxGeometry x="-1" y="3" relative="1" as="geometry">
|
|
||||||
<mxPoint x="1084.5" y="616" as="sourcePoint" />
|
|
||||||
<mxPoint x="1125" y="769.9999999999998" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="1126" y="617" />
|
|
||||||
<mxPoint x="1126" y="770" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="i-RIzz4hhB1Q3m7lVkjo-10" value="Mediumverwalter" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
<mxCell id="i-RIzz4hhB1Q3m7lVkjo-10" value="Mediumverwalter" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
<mxGeometry x="1580" y="390" width="160" height="128" as="geometry" />
|
<mxGeometry x="1580" y="390" width="160" height="128" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
|
@ -357,7 +347,7 @@
|
||||||
<mxGeometry x="1650" y="360" width="60" height="30" as="geometry" />
|
<mxGeometry x="1650" y="360" width="60" height="30" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="i-RIzz4hhB1Q3m7lVkjo-48" value="1" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
<mxCell id="i-RIzz4hhB1Q3m7lVkjo-48" value="1" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
||||||
<mxGeometry x="1120" y="740" width="60" height="30" as="geometry" />
|
<mxGeometry x="1060" y="740" width="60" height="30" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="i-RIzz4hhB1Q3m7lVkjo-49" value="AusleihSystem" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
<mxCell id="i-RIzz4hhB1Q3m7lVkjo-49" value="AusleihSystem" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
<mxGeometry x="801" y="770" width="539" height="180" as="geometry" />
|
<mxGeometry x="801" y="770" width="539" height="180" as="geometry" />
|
||||||
|
@ -416,35 +406,83 @@
|
||||||
<mxGeometry x="1760" y="550" width="60" height="30" as="geometry" />
|
<mxGeometry x="1760" y="550" width="60" height="30" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="i-RIzz4hhB1Q3m7lVkjo-72" value="kommuniziert" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
<mxCell id="i-RIzz4hhB1Q3m7lVkjo-72" value="kommuniziert" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
||||||
<mxGeometry x="1140" y="690" width="60" height="30" as="geometry" />
|
<mxGeometry x="1060" y="670" width="60" height="30" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="i-RIzz4hhB1Q3m7lVkjo-73" value="hat" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
<mxCell id="i-RIzz4hhB1Q3m7lVkjo-73" value="hat" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
||||||
<mxGeometry x="767" y="690" width="60" height="30" as="geometry" />
|
<mxGeometry x="767" y="690" width="60" height="30" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="xSOr38UQ6ttjsq0tnJFV-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.388;entryY=0.019;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="i-RIzz4hhB1Q3m7lVkjo-49" target="ydUtLetK26WXyeJ3qCt--158">
|
<mxCell id="xSOr38UQ6ttjsq0tnJFV-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.388;entryY=0.019;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="i-RIzz4hhB1Q3m7lVkjo-49" target="ydUtLetK26WXyeJ3qCt--158" edge="1">
|
||||||
<mxGeometry relative="1" as="geometry" />
|
<mxGeometry relative="1" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="xSOr38UQ6ttjsq0tnJFV-2" value="<font style="font-size: 12px;">1</font>" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
<mxCell id="xSOr38UQ6ttjsq0tnJFV-2" value="<font style="font-size: 12px;">1</font>" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
||||||
<mxGeometry x="1060" y="950" width="60" height="30" as="geometry" />
|
<mxGeometry x="1060" y="950" width="60" height="30" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="xSOr38UQ6ttjsq0tnJFV-5" value="Kunde" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
<mxCell id="xSOr38UQ6ttjsq0tnJFV-5" value="Studenten" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
<mxGeometry x="1350" y="1450" width="160" height="34" as="geometry" />
|
<mxGeometry x="1350" y="1450" width="160" height="34" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="xSOr38UQ6ttjsq0tnJFV-7" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;" vertex="1" parent="xSOr38UQ6ttjsq0tnJFV-5">
|
<mxCell id="xSOr38UQ6ttjsq0tnJFV-7" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;" parent="xSOr38UQ6ttjsq0tnJFV-5" vertex="1">
|
||||||
<mxGeometry y="26" width="160" height="8" as="geometry" />
|
<mxGeometry y="26" width="160" height="8" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="xSOr38UQ6ttjsq0tnJFV-9" value="Mitarbeiter" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
<mxCell id="xSOr38UQ6ttjsq0tnJFV-17" value="Medium druchsuchen" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
||||||
<mxGeometry x="1550" y="1450" width="160" height="34" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xSOr38UQ6ttjsq0tnJFV-11" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;" vertex="1" parent="xSOr38UQ6ttjsq0tnJFV-9">
|
|
||||||
<mxGeometry y="26" width="160" height="8" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xSOr38UQ6ttjsq0tnJFV-17" value="Medium druchsuchen" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="450" y="375" width="60" height="30" as="geometry" />
|
<mxGeometry x="450" y="375" width="60" height="30" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="xSOr38UQ6ttjsq0tnJFV-18" value="Medium<div>Ausleihen</div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
<mxCell id="xSOr38UQ6ttjsq0tnJFV-18" value="Medium<div>Ausleihen</div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="1" vertex="1">
|
||||||
<mxGeometry x="440" y="440" width="80" height="40" as="geometry" />
|
<mxGeometry x="440" y="440" width="80" height="40" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
|
<mxCell id="l42d9aidsTNYsLyE-SN_-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.057;entryY=-0.011;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="i-RIzz4hhB1Q3m7lVkjo-2" target="ydUtLetK26WXyeJ3qCt--175">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="l42d9aidsTNYsLyE-SN_-2" value="1" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1290" y="439" width="60" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="l42d9aidsTNYsLyE-SN_-3" value="hat" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1470" y="690" width="60" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="l42d9aidsTNYsLyE-SN_-4" value="*" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1470" y="970" width="60" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="l42d9aidsTNYsLyE-SN_-5" value="Mitarbeiter" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1740" y="1437" width="300" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="l42d9aidsTNYsLyE-SN_-7" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;" vertex="1" parent="l42d9aidsTNYsLyE-SN_-5">
|
||||||
|
<mxGeometry y="26" width="300" height="8" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="l42d9aidsTNYsLyE-SN_-8" value="+ gebührenVerbuchen(benutzer: Benutzer): void" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="l42d9aidsTNYsLyE-SN_-5">
|
||||||
|
<mxGeometry y="34" width="300" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="l42d9aidsTNYsLyE-SN_-9" value="Erwachsener" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1550" y="1450" width="160" height="34" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="l42d9aidsTNYsLyE-SN_-11" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;" vertex="1" parent="l42d9aidsTNYsLyE-SN_-9">
|
||||||
|
<mxGeometry y="26" width="160" height="8" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="l42d9aidsTNYsLyE-SN_-13" value="" style="endArrow=none;html=1;rounded=0;" edge="1" parent="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1630" y="1400" as="sourcePoint" />
|
||||||
|
<mxPoint x="1630" y="1400" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="l42d9aidsTNYsLyE-SN_-14" value="" style="endArrow=none;html=1;rounded=0;" edge="1" parent="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1630" y="1400" as="sourcePoint" />
|
||||||
|
<mxPoint x="1890" y="1400" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="l42d9aidsTNYsLyE-SN_-15" value="" style="endArrow=none;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="l42d9aidsTNYsLyE-SN_-5">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1840" y="1450" as="sourcePoint" />
|
||||||
|
<mxPoint x="1890" y="1400" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="l42d9aidsTNYsLyE-SN_-17" value="" style="endArrow=none;html=1;rounded=0;exitX=0.457;exitY=0.004;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.526;entryY=1.014;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="i-RIzz4hhB1Q3m7lVkjo-49" target="i-RIzz4hhB1Q3m7lVkjo-5">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="970" y="660" as="sourcePoint" />
|
||||||
|
<mxPoint x="1020" y="610" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="l42d9aidsTNYsLyE-SN_-18" value="1" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1040.5" y="620" width="60" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
</root>
|
</root>
|
||||||
</mxGraphModel>
|
</mxGraphModel>
|
||||||
</diagram>
|
</diagram>
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 298 KiB |
Binary file not shown.
Before Width: | Height: | Size: 350 KiB |
|
@ -75,12 +75,14 @@ public abstract class Benutzer {
|
||||||
return angemeldet;
|
return angemeldet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void anmelden() {
|
public boolean anmelden() {
|
||||||
this.angemeldet = true;
|
this.angemeldet = true;
|
||||||
|
return this.angemeldet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void abmelden() {
|
public boolean abmelden() {
|
||||||
this.angemeldet = false ;
|
this.angemeldet = false ;
|
||||||
|
return this.angemeldet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,27 +24,27 @@ private BibSystem fassade;
|
||||||
void erstelleObjekt() throws FalscheEingabeException, BenutzerNichtGefundenException {
|
void erstelleObjekt() throws FalscheEingabeException, BenutzerNichtGefundenException {
|
||||||
this.fassade = new BibSystem();
|
this.fassade = new BibSystem();
|
||||||
fassade.userRegistrieren("obai", "student", 15, "nein");
|
fassade.userRegistrieren("obai", "student", 15, "nein");
|
||||||
fassade.userAnmelden("K1000");
|
fassade.userAnmelden("K1001");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Disabled
|
@Disabled
|
||||||
void testMedienSuchenNachTitle()throws MediumNichtGefundenException, FalscheEingabeException, BenutzerNichtAngemeldetException {
|
void testMedienSuchenNachTitle()throws MediumNichtGefundenException, FalscheEingabeException, BenutzerNichtAngemeldetException, BenutzerNichtGefundenException {
|
||||||
ArrayList<String> nichtAusgeliehen = fassade.mediumDurchsuchen("Effektives Java Programmieren", "K1000");
|
ArrayList<String> nichtAusgeliehen = fassade.mediumDurchsuchen("Effektives Java Programmieren", "K1001");
|
||||||
nichtAusgeliehen.forEach(System.out::println);
|
nichtAusgeliehen.forEach(System.out::println);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Disabled
|
@Disabled
|
||||||
void testMedienSuchenNachMedienart()throws MediumNichtGefundenException, FalscheEingabeException, BenutzerNichtAngemeldetException {
|
void testMedienSuchenNachMedienart()throws MediumNichtGefundenException, FalscheEingabeException, BenutzerNichtAngemeldetException, BenutzerNichtGefundenException {
|
||||||
ArrayList<String> nichtAusgeliehen = fassade.mediumDurchsuchen("Videospiele", "K1000");
|
ArrayList<String> nichtAusgeliehen = fassade.mediumDurchsuchen("Videospiele", "K1001");
|
||||||
nichtAusgeliehen.forEach(System.out::println);
|
nichtAusgeliehen.forEach(System.out::println);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testMedienSuchenNachausgeliehen()throws MediumNichtGefundenException, FalscheEingabeException, BenutzerNichtAngemeldetException {
|
void testMedienSuchenNachausgeliehen()throws MediumNichtGefundenException, FalscheEingabeException, BenutzerNichtAngemeldetException, BenutzerNichtGefundenException {
|
||||||
ArrayList<String> nichtAusgeliehen = fassade.mediumDurchsuchen("ausgeliehen", "K1000");
|
ArrayList<String> nichtAusgeliehen = fassade.mediumDurchsuchen("ausgeliehen", "K1001");
|
||||||
nichtAusgeliehen.forEach(System.out::println);
|
nichtAusgeliehen.forEach(System.out::println);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
package domain.Bibliothekskatalog;
|
package domain.Bibliothekskatalog;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import domain.AusleiheSystem.Ausleihe;
|
||||||
import domain.Medium.*;
|
import domain.Medium.*;
|
||||||
|
|
||||||
public class Mediensuchen {
|
public class Mediensuchen {
|
||||||
|
@ -60,14 +64,25 @@ public class Mediensuchen {
|
||||||
.filter(t -> t.getValue().getMedium() instanceof Videospiel)
|
.filter(t -> t.getValue().getMedium() instanceof Videospiel)
|
||||||
.map(t -> t.getValue().getMedium())
|
.map(t -> t.getValue().getMedium())
|
||||||
.map(t -> ((Videospiel)t))
|
.map(t -> ((Videospiel)t))
|
||||||
.map(t -> "Eindutige Kennung= " + t.toString()).collect(Collectors.toCollection(ArrayList::new));
|
.map(t -> "Eindutige Kennung= " + t.toString())
|
||||||
|
.collect(Collectors.toCollection(ArrayList::new));
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Collection<String> baldVerfügbareMedien(ArrayList<Ausleihe> ausleihe) {
|
||||||
|
LocalDate heutigesDatum = LocalDate.now();
|
||||||
|
|
||||||
|
return ausleihe.stream()
|
||||||
|
.filter(t -> t.getAusleiheEnde().until(heutigesDatum, ChronoUnit.DAYS) <= 3)
|
||||||
|
.map(t -> t.getMediumverwalter())
|
||||||
|
.map(t -> t.toString())
|
||||||
|
.collect(Collectors.toCollection(ArrayList::new));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,8 +41,10 @@ public class BibSystem {
|
||||||
|
|
||||||
|
|
||||||
// Mediums Durchsuchen
|
// Mediums Durchsuchen
|
||||||
public ArrayList<String> mediumDurchsuchen(String auswahl, String bibKartenNummer) throws FalscheEingabeException, MediumNichtGefundenException, BenutzerNichtAngemeldetException {
|
public ArrayList<String> mediumDurchsuchen(String auswahl, String bibKartenNummer) throws FalscheEingabeException, MediumNichtGefundenException, BenutzerNichtAngemeldetException, BenutzerNichtGefundenException {
|
||||||
if (!checkIfUserImSystemAngemeldetIst(bibKartenNummer))
|
Benutzer benutzer = findeBenutzer(bibKartenNummer);
|
||||||
|
|
||||||
|
if (benutzer.abmelden())
|
||||||
throw new BenutzerNichtAngemeldetException("Sie müssen sich erst im System anmelden");
|
throw new BenutzerNichtAngemeldetException("Sie müssen sich erst im System anmelden");
|
||||||
|
|
||||||
ArrayList<String> treffer = new ArrayList<>();
|
ArrayList<String> treffer = new ArrayList<>();
|
||||||
|
@ -58,7 +60,11 @@ public class BibSystem {
|
||||||
|| auswahl.equalsIgnoreCase("Dvds") || auswahl.equalsIgnoreCase("Cds")
|
|| auswahl.equalsIgnoreCase("Dvds") || auswahl.equalsIgnoreCase("Cds")
|
||||||
|| auswahl.equalsIgnoreCase("Videospiele"))
|
|| auswahl.equalsIgnoreCase("Videospiele"))
|
||||||
treffer = medienSuchen.medienart(auswahl, medien);
|
treffer = medienSuchen.medienart(auswahl, medien);
|
||||||
|
|
||||||
|
else if (auswahl.equalsIgnoreCase("ja")) {
|
||||||
|
treffer = baldVerfügbareMedien(ausleihe);
|
||||||
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
treffer = medienSuchen.title(auswahl, medien);
|
treffer = medienSuchen.title(auswahl, medien);
|
||||||
|
|
||||||
|
@ -83,7 +89,7 @@ public class BibSystem {
|
||||||
if (bibBenutzer instanceof Mitarbeiter)
|
if (bibBenutzer instanceof Mitarbeiter)
|
||||||
throw new Exception("Mitarbeiter können keine Mediums ausleihen!");
|
throw new Exception("Mitarbeiter können keine Mediums ausleihen!");
|
||||||
|
|
||||||
if (!checkIfUserImSystemAngemeldetIst(bibKartenNummer))
|
if (bibBenutzer.abmelden())
|
||||||
throw new BenutzerNichtAngemeldetException("Sie müssen sich erst im System anmelden");
|
throw new BenutzerNichtAngemeldetException("Sie müssen sich erst im System anmelden");
|
||||||
|
|
||||||
Ausleihe neueAusleihe = ausleiheSystem.mediumAusleihen(bibBenutzer, eindeutigeKennung);
|
Ausleihe neueAusleihe = ausleiheSystem.mediumAusleihen(bibBenutzer, eindeutigeKennung);
|
||||||
|
@ -203,11 +209,7 @@ public class BibSystem {
|
||||||
medien.put(Videospiel.getMedium().getID(), Videospiel);
|
medien.put(Videospiel.getMedium().getID(), Videospiel);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkIfUserImSystemAngemeldetIst(String bibKartenNummer) {
|
|
||||||
return alleBibBenutzer.stream()
|
|
||||||
.filter(b -> b.getBibAusweis().getKartenNummer().equalsIgnoreCase(bibKartenNummer))
|
|
||||||
.anyMatch(user -> user.isAngemeldet());
|
|
||||||
}
|
|
||||||
|
|
||||||
public Benutzer findeBenutzer(String bibKartenNummer) throws BenutzerNichtGefundenException {
|
public Benutzer findeBenutzer(String bibKartenNummer) throws BenutzerNichtGefundenException {
|
||||||
return alleBibBenutzer.stream()
|
return alleBibBenutzer.stream()
|
||||||
|
|
|
@ -134,13 +134,18 @@ public class Tui {
|
||||||
// Aktion: 3
|
// Aktion: 3
|
||||||
private void mediumDurchsuchenProzess() {
|
private void mediumDurchsuchenProzess() {
|
||||||
System.out.println("<< Medien durchsuchen >>");
|
System.out.println("<< Medien durchsuchen >>");
|
||||||
System.out.print("Suchkriterium (z. B. Titel, Medienart): ");
|
System.out.print("Suchkriterium (z. B. Titel, Medienart, Ausgeliehen, nicht Ausgeliehen,Medien die bald wieder verügbar sind (ja/nein)): ");
|
||||||
String auswahl = eingabe.nextLine();
|
String auswahl = eingabe.nextLine();
|
||||||
|
|
||||||
System.out.print("BibKartennummer: ");
|
System.out.print("BibKartennummer: ");
|
||||||
String bibKartennummer = eingabe.nextLine();
|
String bibKartennummer = eingabe.nextLine();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (auswahl.equalsIgnoreCase("Medienart")) {
|
||||||
|
System.out.println("Bücher, Brettspiele, Dvds, Cds, Videospiele");
|
||||||
|
auswahl = eingabe.nextLine();
|
||||||
|
}
|
||||||
|
|
||||||
ArrayList<String> treffer = fassade.mediumDurchsuchen(auswahl, bibKartennummer);
|
ArrayList<String> treffer = fassade.mediumDurchsuchen(auswahl, bibKartennummer);
|
||||||
treffer.forEach(System.out::println);
|
treffer.forEach(System.out::println);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue