Skip to content

Instantly share code, notes, and snippets.

@jtuttas
Last active December 30, 2020 14:17
Show Gist options
  • Save jtuttas/c742f6bd7a8d36f4c5dcae9efcb61821 to your computer and use it in GitHub Desktop.
Save jtuttas/c742f6bd7a8d36f4c5dcae9efcb61821 to your computer and use it in GitHub Desktop.
IHK Aufgaben
<mxfile host="65bd71144e" modified="2020-12-30T14:17:58.264Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.52.0 Chrome/83.0.4103.122 Electron/9.3.5 Safari/537.36" etag="O_ioZgWCppsgLUfVQ_hY" version="13.10.0" type="embed">
<diagram id="7axcHnemPGxGrDsgHI2C" name="HS3">
<mxGraphModel dx="545" dy="492" grid="1" gridSize="10" guides="0" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="2" value="&lt;h1&gt;3. Handlungsschritt (25 Punkte)&lt;/h1&gt;&lt;p&gt;Die Realisierung des Onlineshops soll mit einer objektorientierten Programmiersprache erfolgen.&lt;/p&gt;&lt;p&gt;a) Es sind folgende Pflichfelder gegeben:&lt;/p&gt;&lt;p&gt;- Ein &quot;Artikel&quot; hat einen Namen und einen&amp;nbsp; Preis&lt;/p&gt;&lt;p&gt;- Beim Anlegen eines neuen Artikels werden Name und Preis festgelegt&lt;/p&gt;&lt;p&gt;- Der Name eines Artikels kann abgefragt, aber nicht veraendert werden&lt;/p&gt;&lt;p&gt;- Der Preis eines Artikel kann abgefragt und veraendert werden&lt;/p&gt;&lt;p&gt;- Einem &quot;Warenkorb&quot; koennen verschiedene Artikel in beliebiger Stueckzahl hinzugefuegt werden.&lt;/p&gt;&lt;p&gt;- Fuer den Inhalt des Warenkorbs kann der Gesamtwert berechnet werden.&lt;/p&gt;&lt;p&gt;- Instanzvariablen sind nach aussen nicht sichtbar (information hiding / Geheimnisprinzip)&lt;/p&gt;&lt;p&gt;- Methoden sollen von ueberall her aufrufbar sein.&lt;/p&gt;&lt;p&gt;Ergaenzen Sie das nachstehende UML-Klassendiagramm, damit es die Anforderugen des Pflichtenheftes erfuellt.&lt;/p&gt;&lt;p&gt;Hinweis: Geben Sie bei Attributen und Methoden die vollstaendige UML-Syntax an.&lt;/p&gt;" style="text;html=1;strokeColor=#314354;fillColor=#647687;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;connectable=0;fontColor=#ffffff;" parent="1" vertex="1">
<mxGeometry x="30" y="30" width="680" height="380" as="geometry"/>
</mxCell>
<mxCell id="Ipkzv3MzEu720mXnNtbY-12" value="ba) Das Pflichtenheft wird um folgende Punkte erweitert:&lt;br&gt;&lt;br&gt;- Die Versandkosten sollen ebenfalls ermittelt werden.&lt;br&gt;&lt;br&gt;- Bei Standard-Lieferungen und Erpress-Lieferungen werden unterschiedliche Berechnungsalgorithmen verwendet.&lt;br&gt;&lt;br&gt;- Die Berechnungsalgorithmen der Versandkosten wechseln haeufig, deshalb sollen sie vom Warenkorb entkoppelt sein.&lt;br&gt;&lt;br&gt;- Dazu soll die Klasse &quot;Warenkorb&quot; um eine Referenz &quot;versand&quot; vom Typ des Interface &quot;Versand&quot;, eine Methode &quot;setVersand&quot; zum Setzten der Versandart und eine Methode &quot;getVersandkosten&quot; zur Abfrage der Versandkosten erweitert werden.&lt;br&gt;&lt;br&gt;Ergaenzen Sie unten das gegebene UML-Klassendiagramm syntaktisch vollstaendig." style="text;html=1;strokeColor=#314354;fillColor=#647687;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;connectable=0;fontColor=#ffffff;" parent="1" vertex="1">
<mxGeometry x="20" y="1190" width="690" height="210" as="geometry"/>
</mxCell>
<mxCell id="4K8CC2FeGVw1ihzm4heP-16" value="&lt;&lt;Interface&gt;&gt;&#10;Versand" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=40;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;connectable=0;" parent="1" vertex="1">
<mxGeometry x="500" y="1440" width="210" height="74" as="geometry"/>
</mxCell>
<mxCell id="4K8CC2FeGVw1ihzm4heP-17" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="4K8CC2FeGVw1ihzm4heP-16" vertex="1">
<mxGeometry y="40" width="210" height="8" as="geometry"/>
</mxCell>
<mxCell id="4K8CC2FeGVw1ihzm4heP-18" value="+ berechnen(Warenkorb):double" 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;" parent="4K8CC2FeGVw1ihzm4heP-16" vertex="1">
<mxGeometry y="48" width="210" height="26" as="geometry"/>
</mxCell>
<mxCell id="5GWcvz42P28ZqP3p6T5y-12" value="bb) Implementieren Sie in Pseudocode die Methode &quot;getVersandkosten&quot; der Klasse Warenkorb." style="text;html=1;strokeColor=#314354;fillColor=#647687;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;connectable=0;fontColor=#ffffff;" parent="1" vertex="1">
<mxGeometry x="20" y="2400" width="690" height="20" as="geometry"/>
</mxCell>
<mxCell id="5GWcvz42P28ZqP3p6T5y-13" value="" style="text;html=1;fillColor=#eeeeee;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;connectable=1;strokeColor=#36393d;fontColor=#000000;" parent="1" vertex="1">
<mxGeometry x="20" y="2440" width="690" height="120" as="geometry"/>
</mxCell>
<mxCell id="23" value="Warenkorb" 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;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;connectable=0;" parent="1" vertex="1">
<mxGeometry x="430" y="500" width="250" height="210" as="geometry"/>
</mxCell>
<mxCell id="24" value="+ field: type" 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;" parent="23" vertex="1">
<mxGeometry y="26" width="250" height="84" as="geometry"/>
</mxCell>
<mxCell id="25" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="23" vertex="1">
<mxGeometry y="110" width="250" height="8" as="geometry"/>
</mxCell>
<mxCell id="26" value="+ method(type): type" 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;" parent="23" vertex="1">
<mxGeometry y="118" width="250" height="92" as="geometry"/>
</mxCell>
<mxCell id="27" value="Artikel" 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;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;connectable=0;" parent="1" vertex="1">
<mxGeometry x="100" y="500" width="270" height="208" as="geometry"/>
</mxCell>
<mxCell id="28" value="+ field: type" 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;" parent="27" vertex="1">
<mxGeometry y="26" width="270" height="84" as="geometry"/>
</mxCell>
<mxCell id="29" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="27" vertex="1">
<mxGeometry y="110" width="270" height="8" as="geometry"/>
</mxCell>
<mxCell id="30" value="+ method(type): type" 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;" parent="27" vertex="1">
<mxGeometry y="118" width="270" height="90" as="geometry"/>
</mxCell>
<mxCell id="31" value="Warenkorb" 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;labelBackgroundColor=none;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;connectable=0;" parent="1" vertex="1">
<mxGeometry x="30" y="1440" width="240" height="184" as="geometry"/>
</mxCell>
<mxCell id="38" value="+ item: attribute" 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;" parent="31" vertex="1">
<mxGeometry y="26" width="240" height="64" as="geometry"/>
</mxCell>
<mxCell id="33" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="31" vertex="1">
<mxGeometry y="90" width="240" height="8" as="geometry"/>
</mxCell>
<mxCell id="34" value="+ getVersandkosten():double" 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;" parent="31" vertex="1">
<mxGeometry y="98" width="240" height="86" as="geometry"/>
</mxCell>
<mxCell id="35" value="&lt;span style=&quot;text-align: left;&quot;&gt;(14 Punkte)&lt;/span&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;labelBackgroundColor=none;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;connectable=0;fontColor=#000000;" parent="1" vertex="1">
<mxGeometry x="720" y="110" width="90" height="20" as="geometry"/>
</mxCell>
<mxCell id="36" value="&lt;span style=&quot;text-align: left;&quot;&gt;(8 Punkte)&lt;/span&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;labelBackgroundColor=none;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;connectable=0;fontColor=#000000;" parent="1" vertex="1">
<mxGeometry x="710" y="1190" width="100" height="20" as="geometry"/>
</mxCell>
<mxCell id="37" value="&lt;span style=&quot;text-align: left;&quot;&gt;(3 Punkte)&lt;/span&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;labelBackgroundColor=none;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;connectable=0;fontColor=#000000;" parent="1" vertex="1">
<mxGeometry x="730" y="2400" width="80" height="20" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment