Programmieren mit Java
-
+
diff --git a/pr-preview/pr-75/additional-material/daniel-java1/cheatsheet/index.html b/pr-preview/pr-75/additional-material/daniel-java1/cheatsheet/index.html
index f5c10c0feb..898e0e7b59 100644
--- a/pr-preview/pr-75/additional-material/daniel-java1/cheatsheet/index.html
+++ b/pr-preview/pr-75/additional-material/daniel-java1/cheatsheet/index.html
@@ -4,7 +4,7 @@
Cheatsheet | Programmieren mit Java
-
+
diff --git a/pr-preview/pr-75/additional-material/daniel-java1/exam-results/index.html b/pr-preview/pr-75/additional-material/daniel-java1/exam-results/index.html
index 6f4af4a294..e93025fcbe 100644
--- a/pr-preview/pr-75/additional-material/daniel-java1/exam-results/index.html
+++ b/pr-preview/pr-75/additional-material/daniel-java1/exam-results/index.html
@@ -4,7 +4,7 @@
Klausurergebnisse | Programmieren mit Java
-
+
diff --git a/pr-preview/pr-75/additional-material/daniel-java1/index.html b/pr-preview/pr-75/additional-material/daniel-java1/index.html
index f23fc5f713..5c2eec615f 100644
--- a/pr-preview/pr-75/additional-material/daniel-java1/index.html
+++ b/pr-preview/pr-75/additional-material/daniel-java1/index.html
@@ -4,7 +4,7 @@
Daniel (Programmierung 1) | Programmieren mit Java
-
+
diff --git a/pr-preview/pr-75/additional-material/daniel-java1/sample-exam/index.html b/pr-preview/pr-75/additional-material/daniel-java1/sample-exam/index.html
index d891363749..4425b068e4 100644
--- a/pr-preview/pr-75/additional-material/daniel-java1/sample-exam/index.html
+++ b/pr-preview/pr-75/additional-material/daniel-java1/sample-exam/index.html
@@ -4,7 +4,7 @@
Musterklausur | Programmieren mit Java
-
+
diff --git a/pr-preview/pr-75/additional-material/daniel-java2/cheatsheet/index.html b/pr-preview/pr-75/additional-material/daniel-java2/cheatsheet/index.html
index 9189d66e2b..5be98cefd4 100644
--- a/pr-preview/pr-75/additional-material/daniel-java2/cheatsheet/index.html
+++ b/pr-preview/pr-75/additional-material/daniel-java2/cheatsheet/index.html
@@ -4,7 +4,7 @@
Cheatsheet | Programmieren mit Java
-
+
diff --git a/pr-preview/pr-75/additional-material/daniel-java2/exam-results/index.html b/pr-preview/pr-75/additional-material/daniel-java2/exam-results/index.html
index 891f3bca65..71bbd3cf66 100644
--- a/pr-preview/pr-75/additional-material/daniel-java2/exam-results/index.html
+++ b/pr-preview/pr-75/additional-material/daniel-java2/exam-results/index.html
@@ -4,7 +4,7 @@
Klausurergebnisse | Programmieren mit Java
-
+
diff --git a/pr-preview/pr-75/additional-material/daniel-java2/index.html b/pr-preview/pr-75/additional-material/daniel-java2/index.html
index a7caef1971..98da381710 100644
--- a/pr-preview/pr-75/additional-material/daniel-java2/index.html
+++ b/pr-preview/pr-75/additional-material/daniel-java2/index.html
@@ -4,7 +4,7 @@
Daniel (Programmierung 2) | Programmieren mit Java
-
+
diff --git a/pr-preview/pr-75/additional-material/daniel-java2/sample-exam/index.html b/pr-preview/pr-75/additional-material/daniel-java2/sample-exam/index.html
index 65574bf63f..0d1bfd3cd4 100644
--- a/pr-preview/pr-75/additional-material/daniel-java2/sample-exam/index.html
+++ b/pr-preview/pr-75/additional-material/daniel-java2/sample-exam/index.html
@@ -4,7 +4,7 @@
Musterklausur | Programmieren mit Java
-
+
diff --git a/pr-preview/pr-75/additional-material/instructions/index.html b/pr-preview/pr-75/additional-material/instructions/index.html
index f3a9327195..19ce76842e 100644
--- a/pr-preview/pr-75/additional-material/instructions/index.html
+++ b/pr-preview/pr-75/additional-material/instructions/index.html
@@ -4,7 +4,7 @@
Anleitungen | Programmieren mit Java
-
+
diff --git a/pr-preview/pr-75/additional-material/instructions/setup-eclipse/index.html b/pr-preview/pr-75/additional-material/instructions/setup-eclipse/index.html
index d0b241266e..75528ab6eb 100644
--- a/pr-preview/pr-75/additional-material/instructions/setup-eclipse/index.html
+++ b/pr-preview/pr-75/additional-material/instructions/setup-eclipse/index.html
@@ -4,7 +4,7 @@
Eclipse einrichten | Programmieren mit Java
-
+
diff --git a/pr-preview/pr-75/additional-material/instructions/use-cli/index.html b/pr-preview/pr-75/additional-material/instructions/use-cli/index.html
index 21cf600181..cf2758c254 100644
--- a/pr-preview/pr-75/additional-material/instructions/use-cli/index.html
+++ b/pr-preview/pr-75/additional-material/instructions/use-cli/index.html
@@ -4,7 +4,7 @@
Kommandozeile verwenden | Programmieren mit Java
-
+
diff --git a/pr-preview/pr-75/additional-material/instructions/use-git/index.html b/pr-preview/pr-75/additional-material/instructions/use-git/index.html
index bcf41e056f..bb5eaba5fe 100644
--- a/pr-preview/pr-75/additional-material/instructions/use-git/index.html
+++ b/pr-preview/pr-75/additional-material/instructions/use-git/index.html
@@ -4,7 +4,7 @@
Git in Eclipse verwenden | Programmieren mit Java
-
+
diff --git a/pr-preview/pr-75/additional-material/steffen/index.html b/pr-preview/pr-75/additional-material/steffen/index.html
index 8fb90f3080..25f85406de 100644
--- a/pr-preview/pr-75/additional-material/steffen/index.html
+++ b/pr-preview/pr-75/additional-material/steffen/index.html
@@ -4,7 +4,7 @@
Steffen | Programmieren mit Java
-
+
diff --git a/pr-preview/pr-75/assets/js/0d0c8197.bbef33a1.js b/pr-preview/pr-75/assets/js/0d0c8197.1dcd66ba.js
similarity index 61%
rename from pr-preview/pr-75/assets/js/0d0c8197.bbef33a1.js
rename to pr-preview/pr-75/assets/js/0d0c8197.1dcd66ba.js
index 6417419fb5..af4341bdfa 100644
--- a/pr-preview/pr-75/assets/js/0d0c8197.bbef33a1.js
+++ b/pr-preview/pr-75/assets/js/0d0c8197.1dcd66ba.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[5873],{77850:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>p,frontMatter:()=>i,metadata:()=>o,toc:()=>l});var a=s(85893),r=s(11151);const i={title:"Smartphone-Shop",description:"",tags:["records","maps","optionals","java-stream-api"]},t=void 0,o={id:"exam-exercises/exam-exercises-java2/phone-store",title:"Smartphone-Shop",description:"",source:"@site/docs/exam-exercises/exam-exercises-java2/phone-store.md",sourceDirName:"exam-exercises/exam-exercises-java2",slug:"/exam-exercises/exam-exercises-java2/phone-store",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/phone-store",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exam-exercises/exam-exercises-java2/phone-store.md",tags:[{label:"records",permalink:"/java-docs/pr-preview/pr-75/tags/records"},{label:"maps",permalink:"/java-docs/pr-preview/pr-75/tags/maps"},{label:"optionals",permalink:"/java-docs/pr-preview/pr-75/tags/optionals"},{label:"java-stream-api",permalink:"/java-docs/pr-preview/pr-75/tags/java-stream-api"}],version:"current",frontMatter:{title:"Smartphone-Shop",description:"",tags:["records","maps","optionals","java-stream-api"]},sidebar:"examExercisesSidebar",previous:{title:"Messdaten",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/measurement-data"},next:{title:"Planeten",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/planets"}},c={},l=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Hinweise zur Klasse PhoneStore",id:"hinweise-zur-klasse-phonestore",level:2}];function d(e){const n={code:"code",h2:"h2",li:"li",mermaid:"mermaid",p:"p",ul:"ul",...(0,r.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.p,{children:"Setze das abgebildete Klassendiagramm vollst\xe4ndig um. Erstelle zum Testen eine\nausf\xfchrbare Klasse und/oder eine Testklasse."}),"\n",(0,a.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,a.jsx)(n.mermaid,{value:"classDiagram\n Phone o-- ConnectionType\n Phone o-- Brand\n PhoneStore o-- Phone\n\n class ConnectionType {\n <>\n USB_C = USB C, true\n USB_MICRO = USB Micro, false\n THUNDERBOLT = Thunderbolt, true\n -description String\n -isModern boolean\n }\n\n class Brand {\n <>\n SAMSUNG\n APPLE\n HUAWEI\n }\n\n class Phone {\n <>\n -description String\n -brand Brand\n -conncetionType ConnectionType\n -numberOfCameras int\n -batteryCapacityInMAh int\n -cpuPowerInGHz double\n -priceInEuro double\n }\n\n class DataProvider {\n +getPhones()$ List~Phone~\n }\n\n class PhoneStore {\n <>\n -phones List~Phone~\n +query1() List~Phone~\n +query2() OptionalDouble\n +query3(maxPriceInEuro double) List~Phone~\n +query4() Map~Phone, String~\n +query5() Map~ConnectionTyp, List~Phone~~\n }"}),"\n",(0,a.jsx)(n.h2,{id:"hinweise-zur-klasse-phonestore",children:"Hinweise zur Klasse PhoneStore"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Die Methode ",(0,a.jsx)(n.code,{children:"List query1()"})," soll die drei leistungsst\xe4rksten\nSmartphones mit 3 Kameras der Marke Huawei absteigend nach dem Preis\nzur\xfcckgeben"]}),"\n",(0,a.jsxs)(n.li,{children:["Die Methode ",(0,a.jsx)(n.code,{children:"OptionalDouble query2()"})," soll die durchschnittliche Anzahl\nKameras aller Smartphones zur\xfcckgeben, die eine Akkukapazit\xe4t von 2500 mAh\noder mehr haben"]}),"\n",(0,a.jsxs)(n.li,{children:["Die Methode ",(0,a.jsx)(n.code,{children:"List query3(maxPriceInEuro: double)"})," soll alle Smartphones\naufsteigend nach Preis zur\xfcckgeben, die den eingehenden H\xf6chstpreis nicht\n\xfcberschreiten, einen modernen Anschlusstyp haben und weniger als 2,4 GHz\nLeistung besitzen"]}),"\n",(0,a.jsxs)(n.li,{children:["Die Methode ",(0,a.jsx)(n.code,{children:"Map query4()"})," soll jedes Smartphone mit der\nzusammengesetzten Zeichenkette aus Marke und Anschlusstyp zur\xfcckgeben"]}),"\n",(0,a.jsxs)(n.li,{children:["Die Methode ",(0,a.jsx)(n.code,{children:"Map query4()"})," soll alle Smartphones\ngruppiert nach dem Anschlusstyp zur\xfcckgeben"]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},11151:(e,n,s)=>{s.d(n,{Z:()=>o,a:()=>t});var a=s(67294);const r={},i=a.createContext(r);function t(e){const n=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[5873],{77850:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>p,frontMatter:()=>i,metadata:()=>o,toc:()=>l});var a=s(85893),r=s(11151);const i={title:"Smartphone-Shop",description:"",tags:["records","maps","optionals","java-stream-api"]},t=void 0,o={id:"exam-exercises/exam-exercises-java2/phone-store",title:"Smartphone-Shop",description:"",source:"@site/docs/exam-exercises/exam-exercises-java2/phone-store.md",sourceDirName:"exam-exercises/exam-exercises-java2",slug:"/exam-exercises/exam-exercises-java2/phone-store",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/phone-store",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exam-exercises/exam-exercises-java2/phone-store.md",tags:[{label:"records",permalink:"/java-docs/pr-preview/pr-75/tags/records"},{label:"maps",permalink:"/java-docs/pr-preview/pr-75/tags/maps"},{label:"optionals",permalink:"/java-docs/pr-preview/pr-75/tags/optionals"},{label:"java-stream-api",permalink:"/java-docs/pr-preview/pr-75/tags/java-stream-api"}],version:"current",frontMatter:{title:"Smartphone-Shop",description:"",tags:["records","maps","optionals","java-stream-api"]},sidebar:"examExercisesSidebar",previous:{title:"Messdaten",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/measurement-data"},next:{title:"Planeten",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/planets"}},c={},l=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Hinweise zur Klasse PhoneStore",id:"hinweise-zur-klasse-phonestore",level:2}];function d(e){const n={code:"code",h2:"h2",li:"li",mermaid:"mermaid",p:"p",ul:"ul",...(0,r.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.p,{children:"Setze das abgebildete Klassendiagramm vollst\xe4ndig um. Erstelle zum Testen eine\nausf\xfchrbare Klasse und/oder eine Testklasse."}),"\n",(0,a.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,a.jsx)(n.mermaid,{value:"classDiagram\n Phone o-- ConnectionType\n Phone o-- Brand\n PhoneStore o-- Phone\n\n class ConnectionType {\n <>\n USB_C = USB C, true\n USB_MICRO = USB Micro, false\n THUNDERBOLT = Thunderbolt, true\n -description String\n -isModern boolean\n }\n\n class Brand {\n <>\n SAMSUNG\n APPLE\n HUAWEI\n }\n\n class Phone {\n <>\n -description String\n -brand Brand\n -conncetionType ConnectionType\n -numberOfCameras int\n -batteryCapacityInMAh int\n -cpuPowerInGHz double\n -priceInEuro double\n }\n\n class DataProvider {\n +getPhones()$ List~Phone~\n }\n\n class PhoneStore {\n <>\n -phones List~Phone~\n +query1() List~Phone~\n +query2() OptionalDouble\n +query3(maxPriceInEuro double) List~Phone~\n +query4() Map~Phone‚ String~\n +query5() Map~ConnectionTyp‚ List~Phone~~\n }"}),"\n",(0,a.jsx)(n.h2,{id:"hinweise-zur-klasse-phonestore",children:"Hinweise zur Klasse PhoneStore"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Die Methode ",(0,a.jsx)(n.code,{children:"List query1()"})," soll die drei leistungsst\xe4rksten\nSmartphones mit 3 Kameras der Marke Huawei absteigend nach dem Preis\nzur\xfcckgeben"]}),"\n",(0,a.jsxs)(n.li,{children:["Die Methode ",(0,a.jsx)(n.code,{children:"OptionalDouble query2()"})," soll die durchschnittliche Anzahl\nKameras aller Smartphones zur\xfcckgeben, die eine Akkukapazit\xe4t von 2500 mAh\noder mehr haben"]}),"\n",(0,a.jsxs)(n.li,{children:["Die Methode ",(0,a.jsx)(n.code,{children:"List query3(maxPriceInEuro: double)"})," soll alle Smartphones\naufsteigend nach Preis zur\xfcckgeben, die den eingehenden H\xf6chstpreis nicht\n\xfcberschreiten, einen modernen Anschlusstyp haben und weniger als 2,4 GHz\nLeistung besitzen"]}),"\n",(0,a.jsxs)(n.li,{children:["Die Methode ",(0,a.jsx)(n.code,{children:"Map query4()"})," soll jedes Smartphone mit der\nzusammengesetzten Zeichenkette aus Marke und Anschlusstyp zur\xfcckgeben"]}),"\n",(0,a.jsxs)(n.li,{children:["Die Methode ",(0,a.jsx)(n.code,{children:"Map query4()"})," soll alle Smartphones\ngruppiert nach dem Anschlusstyp zur\xfcckgeben"]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},11151:(e,n,s)=>{s.d(n,{Z:()=>o,a:()=>t});var a=s(67294);const r={},i=a.createContext(r);function t(e){const n=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/1a6fd549.03e534bf.js b/pr-preview/pr-75/assets/js/1a6fd549.03e534bf.js
deleted file mode 100644
index f36d005c7f..0000000000
--- a/pr-preview/pr-75/assets/js/1a6fd549.03e534bf.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[9866],{13147:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>t,metadata:()=>c,toc:()=>o});var s=a(85893),i=a(11151);const t={title:"Raumstation",description:"",tags:["exceptions","records","maps","optionals"]},r=void 0,c={id:"exam-exercises/exam-exercises-java2/space-station",title:"Raumstation",description:"",source:"@site/docs/exam-exercises/exam-exercises-java2/space-station.md",sourceDirName:"exam-exercises/exam-exercises-java2",slug:"/exam-exercises/exam-exercises-java2/space-station",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/space-station",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exam-exercises/exam-exercises-java2/space-station.md",tags:[{label:"exceptions",permalink:"/java-docs/pr-preview/pr-75/tags/exceptions"},{label:"records",permalink:"/java-docs/pr-preview/pr-75/tags/records"},{label:"maps",permalink:"/java-docs/pr-preview/pr-75/tags/maps"},{label:"optionals",permalink:"/java-docs/pr-preview/pr-75/tags/optionals"}],version:"current",frontMatter:{title:"Raumstation",description:"",tags:["exceptions","records","maps","optionals"]},sidebar:"examExercisesSidebar",previous:{title:"Einkaufsportal",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/shopping-portal"},next:{title:"Videosammlung",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/video-collection"}},l={},o=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Allgemeine Hinweise",id:"allgemeine-hinweise",level:2},{value:"Hinweise zur Klasse SpaceStation",id:"hinweise-zur-klasse-spacestation",level:2}];function d(e){const n={code:"code",h2:"h2",li:"li",mermaid:"mermaid",p:"p",ul:"ul",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"Setze das abgebildete Klassendiagramm vollst\xe4ndig um. Erstelle zum Testen eine\nausf\xfchrbare Klasse und/oder eine Testklasse."}),"\n",(0,s.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,s.jsx)(n.mermaid,{value:"classDiagram\n SpaceStation o-- SpaceFighter\n SpaceFighter o-- Type\n\n class SpaceStation {\n <>\n -name String\n -bays Map~Integer, SpaceFighter~\n +land(bayNumber Integer, spaceFighter SpaceFighter) void\n +getFastestSpaceFighter() Optional~SpaceFighter~\n }\n\n class SpaceFighter {\n <>\n -id String\n -type Type\n }\n\n class Type {\n <>\n A_WING = 1300\n B_WING = 950\n X_WING = 1050\n Y_WING = 1000\n TIE_FIGHTER = 1200\n -maxSpeedInKmh int\n }"}),"\n",(0,s.jsx)(n.h2,{id:"allgemeine-hinweise",children:"Allgemeine Hinweise"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Aus Gr\xfcnden der \xdcbersicht werden im Klassendiagramm keine Getter und\nObject-Methoden dargestellt"}),"\n",(0,s.jsx)(n.li,{children:"So nicht anders angegeben, sollen Konstruktoren, Setter, Getter sowie die\nObject-Methoden wie gewohnt implementiert werden"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"hinweise-zur-klasse-spacestation",children:"Hinweise zur Klasse SpaceStation"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Die Methode ",(0,s.jsx)(n.code,{children:"void land(bayNumber: Integer, spaceFighter: SpaceFighter)"})," soll\nden eingehenden Sternenj\xe4ger in der Bucht mit der eingehenden Buchtnummer\nlanden lassen. F\xfcr den Fall, dass der eingehende Sternenj\xe4ger bereits gelandet\nist (also bereits eine Bucht belegt), soll die Ausnahme\n",(0,s.jsx)(n.code,{children:"SpaceFighterAlreadyLandedException"})," ausgel\xf6st werden und f\xfcr den Fall, dass\ndie Bucht bereits belegt ist, die Ausnahme ",(0,s.jsx)(n.code,{children:"BayAlreadyLoadedException"})]}),"\n",(0,s.jsxs)(n.li,{children:["Die Methode ",(0,s.jsx)(n.code,{children:"Optional getFastestSpaceFighter()"})," soll den\nschnellsten Sternenj\xe4ger der Raumstation als Optional zur\xfcckgeben"]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},11151:(e,n,a)=>{a.d(n,{Z:()=>c,a:()=>r});var s=a(67294);const i={},t=s.createContext(i);function r(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/1a6fd549.676cc2b3.js b/pr-preview/pr-75/assets/js/1a6fd549.676cc2b3.js
new file mode 100644
index 0000000000..66794e8d41
--- /dev/null
+++ b/pr-preview/pr-75/assets/js/1a6fd549.676cc2b3.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[9866],{13147:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>t,metadata:()=>c,toc:()=>o});var s=a(85893),i=a(11151);const t={title:"Raumstation",description:"",tags:["exceptions","records","maps","optionals"]},r=void 0,c={id:"exam-exercises/exam-exercises-java2/space-station",title:"Raumstation",description:"",source:"@site/docs/exam-exercises/exam-exercises-java2/space-station.md",sourceDirName:"exam-exercises/exam-exercises-java2",slug:"/exam-exercises/exam-exercises-java2/space-station",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/space-station",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exam-exercises/exam-exercises-java2/space-station.md",tags:[{label:"exceptions",permalink:"/java-docs/pr-preview/pr-75/tags/exceptions"},{label:"records",permalink:"/java-docs/pr-preview/pr-75/tags/records"},{label:"maps",permalink:"/java-docs/pr-preview/pr-75/tags/maps"},{label:"optionals",permalink:"/java-docs/pr-preview/pr-75/tags/optionals"}],version:"current",frontMatter:{title:"Raumstation",description:"",tags:["exceptions","records","maps","optionals"]},sidebar:"examExercisesSidebar",previous:{title:"Einkaufsportal",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/shopping-portal"},next:{title:"Videosammlung",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/video-collection"}},l={},o=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Allgemeine Hinweise",id:"allgemeine-hinweise",level:2},{value:"Hinweise zur Klasse SpaceStation",id:"hinweise-zur-klasse-spacestation",level:2}];function d(e){const n={code:"code",h2:"h2",li:"li",mermaid:"mermaid",p:"p",ul:"ul",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"Setze das abgebildete Klassendiagramm vollst\xe4ndig um. Erstelle zum Testen eine\nausf\xfchrbare Klasse und/oder eine Testklasse."}),"\n",(0,s.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,s.jsx)(n.mermaid,{value:"classDiagram\n SpaceStation o-- SpaceFighter\n SpaceFighter o-- Type\n\n class SpaceStation {\n <>\n -name String\n -bays Map~Integer‚ SpaceFighter~\n +land(bayNumber Integer, spaceFighter SpaceFighter) void\n +getFastestSpaceFighter() Optional~SpaceFighter~\n }\n\n class SpaceFighter {\n <>\n -id String\n -type Type\n }\n\n class Type {\n <>\n A_WING = 1300\n B_WING = 950\n X_WING = 1050\n Y_WING = 1000\n TIE_FIGHTER = 1200\n -maxSpeedInKmh int\n }"}),"\n",(0,s.jsx)(n.h2,{id:"allgemeine-hinweise",children:"Allgemeine Hinweise"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Aus Gr\xfcnden der \xdcbersicht werden im Klassendiagramm keine Getter und\nObject-Methoden dargestellt"}),"\n",(0,s.jsx)(n.li,{children:"So nicht anders angegeben, sollen Konstruktoren, Setter, Getter sowie die\nObject-Methoden wie gewohnt implementiert werden"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"hinweise-zur-klasse-spacestation",children:"Hinweise zur Klasse SpaceStation"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Die Methode ",(0,s.jsx)(n.code,{children:"void land(bayNumber: Integer, spaceFighter: SpaceFighter)"})," soll\nden eingehenden Sternenj\xe4ger in der Bucht mit der eingehenden Buchtnummer\nlanden lassen. F\xfcr den Fall, dass der eingehende Sternenj\xe4ger bereits gelandet\nist (also bereits eine Bucht belegt), soll die Ausnahme\n",(0,s.jsx)(n.code,{children:"SpaceFighterAlreadyLandedException"})," ausgel\xf6st werden und f\xfcr den Fall, dass\ndie Bucht bereits belegt ist, die Ausnahme ",(0,s.jsx)(n.code,{children:"BayAlreadyLoadedException"})]}),"\n",(0,s.jsxs)(n.li,{children:["Die Methode ",(0,s.jsx)(n.code,{children:"Optional getFastestSpaceFighter()"})," soll den\nschnellsten Sternenj\xe4ger der Raumstation als Optional zur\xfcckgeben"]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},11151:(e,n,a)=>{a.d(n,{Z:()=>c,a:()=>r});var s=a(67294);const i={},t=s.createContext(i);function r(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/1b91faeb.0faed665.js b/pr-preview/pr-75/assets/js/1b91faeb.0faed665.js
deleted file mode 100644
index 59fb7ac20f..0000000000
--- a/pr-preview/pr-75/assets/js/1b91faeb.0faed665.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[4705],{11904:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>a});var t=s(85893),i=s(11151);const o={title:"UnitTests03",description:""},r=void 0,l={id:"exercises/unit-tests/unit-tests03",title:"UnitTests03",description:"",source:"@site/docs/exercises/unit-tests/unit-tests03.md",sourceDirName:"exercises/unit-tests",slug:"/exercises/unit-tests/unit-tests03",permalink:"/java-docs/pr-preview/pr-75/exercises/unit-tests/unit-tests03",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exercises/unit-tests/unit-tests03.md",tags:[],version:"current",frontMatter:{title:"UnitTests03",description:""},sidebar:"exercisesSidebar",previous:{title:"UnitTests02",permalink:"/java-docs/pr-preview/pr-75/exercises/unit-tests/unit-tests02"},next:{title:"UnitTests04",permalink:"/java-docs/pr-preview/pr-75/exercises/unit-tests/unit-tests04"}},d={},a=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Hinweise zur Klasse TelephoneBookTest",id:"hinweise-zur-klasse-telephonebooktest",level:2},{value:"Hinweis",id:"hinweis",level:2}];function c(e){const n={a:"a",code:"code",h2:"h2",li:"li",mermaid:"mermaid",p:"p",ul:"ul",...(0,i.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["Erstelle die JUnit5-Testklasse ",(0,t.jsx)(n.code,{children:"TelephoneBookTest"})," anhand des abgebildeten\nKlassendiagramms."]}),"\n",(0,t.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,t.jsx)(n.mermaid,{value:"classDiagram\n TelephoneBook o-- Person\n TelephoneBook o-- TelephoneNumber\n TelephoneBookTest o-- TelephoneBook\n\n class Person {\n <>\n -name String\n }\n\n class TelephoneNumber {\n <>\n -value String\n }\n\n class TelephoneBook {\n <>\n -entries Map~Person, TelephoneNumber~\n +addEntry(person Person, telephoneNumber TelephoneNumber) void\n +getTelephoneNumberByName(name String) Optional~TelephoneNumber~\n }\n\n class TelephoneBookTest {\n -telephoneBook TelephoneBook\n +setUp() void\n +testAddEntry() void\n +testGetTelephoneNumberByName1() void\n +testGetTelephoneNumberByName2() void\n }"}),"\n",(0,t.jsxs)(n.h2,{id:"hinweise-zur-klasse-telephonebooktest",children:["Hinweise zur Klasse ",(0,t.jsx)(n.code,{children:"TelephoneBookTest"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Die Lebenszyklus-Methode ",(0,t.jsx)(n.code,{children:"void setUp()"})," soll ein Telefonbuch samt\ndazugeh\xf6riger Eintr\xe4ge erzeugen"]}),"\n",(0,t.jsxs)(n.li,{children:["Die Testmethode ",(0,t.jsx)(n.code,{children:"void testAddEntry()"})," soll pr\xfcfen, ob nach dem Ausf\xfchren der\nMethode ",(0,t.jsx)(n.code,{children:"void addEntry(person: Person, telephoneNumber: TelephoneNumber)"})," mit\neiner Person, zu der es bereits einen Eintrag im Telefonbuch gibt, die\nTelefonnummer aktualisiert wurde"]}),"\n",(0,t.jsxs)(n.li,{children:["Die Testmethode ",(0,t.jsx)(n.code,{children:"void testGetTelephoneNumberByName1()"})," soll pr\xfcfen, ob beim\nAusf\xfchren der Methode\n",(0,t.jsx)(n.code,{children:"Optional getTelephoneNumberByName(name: String)"})," mit einem\nNamen, zu dem es eine entsprechende Person im Telefonbuch gibt, die\ndazugeh\xf6rige Telefonnummer als Optional zur\xfcckgegeben wird"]}),"\n",(0,t.jsxs)(n.li,{children:["Die Testmethode ",(0,t.jsx)(n.code,{children:"void testGetTelephoneNumberByName2()"})," soll pr\xfcfen, ob beim\nAusf\xfchren der Methode\n",(0,t.jsx)(n.code,{children:"Optional getTelephoneNumberByName(name: String)"})," mit einem\nNamen, zu dem es keine entsprechende Person im Telefonbuch gibt, ein leeres\nOptional zur\xfcckgegeben wird"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"hinweis",children:"Hinweis"}),"\n",(0,t.jsxs)(n.p,{children:["Verweden die Klasse ",(0,t.jsx)(n.code,{children:"TelephoneBook"})," aus \xdcbungsaufgabe\n",(0,t.jsx)(n.a,{href:"../optionals/optionals02",children:"Optionals02"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},11151:(e,n,s)=>{s.d(n,{Z:()=>l,a:()=>r});var t=s(67294);const i={},o=t.createContext(i);function r(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/1b91faeb.a51b7fb7.js b/pr-preview/pr-75/assets/js/1b91faeb.a51b7fb7.js
new file mode 100644
index 0000000000..3448d66fbb
--- /dev/null
+++ b/pr-preview/pr-75/assets/js/1b91faeb.a51b7fb7.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[4705],{11904:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>a});var t=s(85893),i=s(11151);const o={title:"UnitTests03",description:""},r=void 0,l={id:"exercises/unit-tests/unit-tests03",title:"UnitTests03",description:"",source:"@site/docs/exercises/unit-tests/unit-tests03.md",sourceDirName:"exercises/unit-tests",slug:"/exercises/unit-tests/unit-tests03",permalink:"/java-docs/pr-preview/pr-75/exercises/unit-tests/unit-tests03",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exercises/unit-tests/unit-tests03.md",tags:[],version:"current",frontMatter:{title:"UnitTests03",description:""},sidebar:"exercisesSidebar",previous:{title:"UnitTests02",permalink:"/java-docs/pr-preview/pr-75/exercises/unit-tests/unit-tests02"},next:{title:"UnitTests04",permalink:"/java-docs/pr-preview/pr-75/exercises/unit-tests/unit-tests04"}},d={},a=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Hinweise zur Klasse TelephoneBookTest",id:"hinweise-zur-klasse-telephonebooktest",level:2},{value:"Hinweis",id:"hinweis",level:2}];function c(e){const n={a:"a",code:"code",h2:"h2",li:"li",mermaid:"mermaid",p:"p",ul:"ul",...(0,i.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["Erstelle die JUnit5-Testklasse ",(0,t.jsx)(n.code,{children:"TelephoneBookTest"})," anhand des abgebildeten\nKlassendiagramms."]}),"\n",(0,t.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,t.jsx)(n.mermaid,{value:"classDiagram\n TelephoneBook o-- Person\n TelephoneBook o-- TelephoneNumber\n TelephoneBookTest o-- TelephoneBook\n\n class Person {\n <>\n -name String\n }\n\n class TelephoneNumber {\n <>\n -value String\n }\n\n class TelephoneBook {\n <>\n -entries Map~Person‚ TelephoneNumber~\n +addEntry(person Person, telephoneNumber TelephoneNumber) void\n +getTelephoneNumberByName(name String) Optional~TelephoneNumber~\n }\n\n class TelephoneBookTest {\n -telephoneBook TelephoneBook\n +setUp() void\n +testAddEntry() void\n +testGetTelephoneNumberByName1() void\n +testGetTelephoneNumberByName2() void\n }"}),"\n",(0,t.jsxs)(n.h2,{id:"hinweise-zur-klasse-telephonebooktest",children:["Hinweise zur Klasse ",(0,t.jsx)(n.code,{children:"TelephoneBookTest"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Die Lebenszyklus-Methode ",(0,t.jsx)(n.code,{children:"void setUp()"})," soll ein Telefonbuch samt\ndazugeh\xf6riger Eintr\xe4ge erzeugen"]}),"\n",(0,t.jsxs)(n.li,{children:["Die Testmethode ",(0,t.jsx)(n.code,{children:"void testAddEntry()"})," soll pr\xfcfen, ob nach dem Ausf\xfchren der\nMethode ",(0,t.jsx)(n.code,{children:"void addEntry(person: Person, telephoneNumber: TelephoneNumber)"})," mit\neiner Person, zu der es bereits einen Eintrag im Telefonbuch gibt, die\nTelefonnummer aktualisiert wurde"]}),"\n",(0,t.jsxs)(n.li,{children:["Die Testmethode ",(0,t.jsx)(n.code,{children:"void testGetTelephoneNumberByName1()"})," soll pr\xfcfen, ob beim\nAusf\xfchren der Methode\n",(0,t.jsx)(n.code,{children:"Optional getTelephoneNumberByName(name: String)"})," mit einem\nNamen, zu dem es eine entsprechende Person im Telefonbuch gibt, die\ndazugeh\xf6rige Telefonnummer als Optional zur\xfcckgegeben wird"]}),"\n",(0,t.jsxs)(n.li,{children:["Die Testmethode ",(0,t.jsx)(n.code,{children:"void testGetTelephoneNumberByName2()"})," soll pr\xfcfen, ob beim\nAusf\xfchren der Methode\n",(0,t.jsx)(n.code,{children:"Optional getTelephoneNumberByName(name: String)"})," mit einem\nNamen, zu dem es keine entsprechende Person im Telefonbuch gibt, ein leeres\nOptional zur\xfcckgegeben wird"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"hinweis",children:"Hinweis"}),"\n",(0,t.jsxs)(n.p,{children:["Verweden die Klasse ",(0,t.jsx)(n.code,{children:"TelephoneBook"})," aus \xdcbungsaufgabe\n",(0,t.jsx)(n.a,{href:"../optionals/optionals02",children:"Optionals02"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},11151:(e,n,s)=>{s.d(n,{Z:()=>l,a:()=>r});var t=s(67294);const i={},o=t.createContext(i);function r(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/1dd85dc9.8b2171ce.js b/pr-preview/pr-75/assets/js/1dd85dc9.8b2171ce.js
deleted file mode 100644
index 2ca2d75299..0000000000
--- a/pr-preview/pr-75/assets/js/1dd85dc9.8b2171ce.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[6495],{62168:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>u,contentTitle:()=>i,default:()=>p,frontMatter:()=>l,metadata:()=>o,toc:()=>c});var s=r(85893),t=r(11151),a=r(85521);const l={title:"Maps01",description:""},i=void 0,o={id:"exercises/maps/maps01",title:"Maps01",description:"",source:"@site/docs/exercises/maps/maps01.mdx",sourceDirName:"exercises/maps",slug:"/exercises/maps/maps01",permalink:"/java-docs/pr-preview/pr-75/exercises/maps/maps01",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exercises/maps/maps01.mdx",tags:[],version:"current",frontMatter:{title:"Maps01",description:""},sidebar:"exercisesSidebar",previous:{title:"Assoziativspeicher (Maps)",permalink:"/java-docs/pr-preview/pr-75/exercises/maps/"},next:{title:"Maps02",permalink:"/java-docs/pr-preview/pr-75/exercises/maps/maps02"}},u={},c=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Hinweise zur Klasse TelephoneBook",id:"hinweise-zur-klasse-telephonebook",level:2}];function d(e){const n={code:"code",h2:"h2",li:"li",mermaid:"mermaid",ul:"ul",...(0,t.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Erstelle die Klassen ",(0,s.jsx)(n.code,{children:"Person"}),", ",(0,s.jsx)(n.code,{children:"TelephoneNumber"})," und ",(0,s.jsx)(n.code,{children:"TelephoneBook"})," anhand\ndes abgebildeten Klassendiagramms"]}),"\n",(0,s.jsx)(n.li,{children:"Erstelle eine ausf\xfchrbare Klasse, welche ein Telefonbuch mit mehreren\nEintr\xe4gen erzeugt und zu eingegebenen Namen die dazugeh\xf6rigen Telefonnummern\nauf der Konsole ausgibt"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,s.jsx)(n.mermaid,{value:"classDiagram\n TelephoneBook o-- Person\n TelephoneBook o-- TelephoneNumber\n\n class Person {\n <>\n -name String\n }\n\n class TelephoneNumber {\n <>\n -value String\n }\n\n class TelephoneBook {\n <>\n -entries Map~Person, TelephoneNumber~\n +addEntry(person Person, telephoneNumber TelephoneNumber) void\n +getTelephoneNumberByName(name String) TelephoneNumber\n }"}),"\n",(0,s.jsx)(n.h2,{id:"hinweise-zur-klasse-telephonebook",children:"Hinweise zur Klasse TelephoneBook"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Die Methode ",(0,s.jsx)(n.code,{children:"void addEntry(person: Person, telephoneNumber: TelephoneNumber)"}),"\nsoll einen Eintrag im Telefonbuch anlegen"]}),"\n",(0,s.jsxs)(n.li,{children:["Die Methode ",(0,s.jsx)(n.code,{children:"TelephoneNumber getTelephoneNumberByName(name: String)"})," soll die\nTelefonnummer zum eingehenden Namen zur\xfcckgeben"]}),"\n"]}),"\n",(0,s.jsx)(a.Z,{pullRequest:"59",branchSuffix:"maps/01"})]})}function p(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},85162:(e,n,r)=>{r.d(n,{Z:()=>l});r(67294);var s=r(34334);const t={tabItem:"tabItem_Ymn6"};var a=r(85893);function l(e){let{children:n,hidden:r,className:l}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.Z)(t.tabItem,l),hidden:r,children:n})}},74866:(e,n,r)=>{r.d(n,{Z:()=>k});var s=r(67294),t=r(34334),a=r(12466),l=r(16550),i=r(20469),o=r(91980),u=r(67392),c=r(50012);function d(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:n,children:r}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:r,attributes:s,default:t}}=e;return{value:n,label:r,attributes:s,default:t}}))}(r);return function(e){const n=(0,u.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,r])}function h(e){let{value:n,tabValues:r}=e;return r.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:r}=e;const t=(0,l.k6)(),a=function(e){let{queryString:n=!1,groupId:r}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:n,groupId:r});return[(0,o._X)(a),(0,s.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(t.location.search);n.set(a,e),t.replace({...t.location,search:n.toString()})}),[a,t])]}function b(e){const{defaultValue:n,queryString:r=!1,groupId:t}=e,a=p(e),[l,o]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!h({value:n,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=r.find((e=>e.default))??r[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:a}))),[u,d]=m({queryString:r,groupId:t}),[b,f]=function(e){let{groupId:n}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(n),[t,a]=(0,c.Nk)(r);return[t,(0,s.useCallback)((e=>{r&&a.set(e)}),[r,a])]}({groupId:t}),g=(()=>{const e=u??b;return h({value:e,tabValues:a})?e:null})();(0,i.Z)((()=>{g&&o(g)}),[g]);return{selectedValue:l,selectValue:(0,s.useCallback)((e=>{if(!h({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);o(e),d(e),f(e)}),[d,f,a]),tabValues:a}}var f=r(72389);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=r(85893);function x(e){let{className:n,block:r,selectedValue:s,selectValue:l,tabValues:i}=e;const o=[],{blockElementScrollPositionUntilNextRender:u}=(0,a.o5)(),c=e=>{const n=e.currentTarget,r=o.indexOf(n),t=i[r].value;t!==s&&(u(n),l(t))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const r=o.indexOf(e.currentTarget)+1;n=o[r]??o[0];break}case"ArrowLeft":{const r=o.indexOf(e.currentTarget)-1;n=o[r]??o[o.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.Z)("tabs",{"tabs--block":r},n),children:i.map((e=>{let{value:n,label:r,attributes:a}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>o.push(e),onKeyDown:d,onClick:c,...a,className:(0,t.Z)("tabs__item",g.tabItem,a?.className,{"tabs__item--active":s===n}),children:r??n},n)}))})}function j(e){let{lazy:n,children:r,selectedValue:t}=e;const a=(Array.isArray(r)?r:[r]).filter(Boolean);if(n){const e=a.find((e=>e.props.value===t));return e?(0,s.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:a.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==t})))})}function T(e){const n=b(e);return(0,v.jsxs)("div",{className:(0,t.Z)("tabs-container",g.tabList),children:[(0,v.jsx)(x,{...e,...n}),(0,v.jsx)(j,{...e,...n})]})}function k(e){const n=(0,f.Z)();return(0,v.jsx)(T,{...e,children:d(e.children)},String(n))}},85521:(e,n,r)=>{r.d(n,{Z:()=>o});r(67294);var s=r(74866),t=r(85162),a=r(39960),l=r(9286),i=r(85893);function o(e){let{pullRequest:n,branchSuffix:r}=e;return(0,i.jsxs)(s.Z,{children:[(0,i.jsxs)(t.Z,{value:"exercise",label:"Exercise",default:!0,children:[(0,i.jsx)(l.Z,{language:"console",children:`git switch exercises/${r}`}),(0,i.jsx)(a.Z,{to:`https://gitpod.io/#https://github.com/jappuccini/java-exercises/blob/exercises/${r}/Exercise.java`,children:(0,i.jsx)("img",{alt:"Open in Gitpod",src:"https://gitpod.io/button/open-in-gitpod.svg"})})]}),(0,i.jsxs)(t.Z,{value:"solution",label:"Solution",children:[(0,i.jsx)(l.Z,{language:"console",children:`git switch solutions/${r}`}),(0,i.jsx)(a.Z,{to:`https://gitpod.io/#https://github.com/jappuccini/java-exercises/blob/solutions/${r}/Exercise.java`,children:(0,i.jsx)("img",{alt:"Open in Gitpod",src:"https://gitpod.io/button/open-in-gitpod.svg"})})]}),(0,i.jsxs)(t.Z,{value:"pullrequest",label:"Pull Request",children:["Alle \xa0\xc4nderungen zwischen der Aufgabe und der L\xf6sung findest du im Pull Request"," ",(0,i.jsxs)(a.Z,{to:`https://github.com/jappuccini/java-exercises/pull/${n}/files?diff=split`,children:["PR#",n]})]})]})}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/1dd85dc9.b8a6ecd7.js b/pr-preview/pr-75/assets/js/1dd85dc9.b8a6ecd7.js
new file mode 100644
index 0000000000..f6a85343ba
--- /dev/null
+++ b/pr-preview/pr-75/assets/js/1dd85dc9.b8a6ecd7.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[6495],{62168:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>u,contentTitle:()=>i,default:()=>p,frontMatter:()=>l,metadata:()=>o,toc:()=>c});var s=r(85893),t=r(11151),a=r(85521);const l={title:"Maps01",description:""},i=void 0,o={id:"exercises/maps/maps01",title:"Maps01",description:"",source:"@site/docs/exercises/maps/maps01.mdx",sourceDirName:"exercises/maps",slug:"/exercises/maps/maps01",permalink:"/java-docs/pr-preview/pr-75/exercises/maps/maps01",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exercises/maps/maps01.mdx",tags:[],version:"current",frontMatter:{title:"Maps01",description:""},sidebar:"exercisesSidebar",previous:{title:"Assoziativspeicher (Maps)",permalink:"/java-docs/pr-preview/pr-75/exercises/maps/"},next:{title:"Maps02",permalink:"/java-docs/pr-preview/pr-75/exercises/maps/maps02"}},u={},c=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Hinweise zur Klasse TelephoneBook",id:"hinweise-zur-klasse-telephonebook",level:2}];function d(e){const n={code:"code",h2:"h2",li:"li",mermaid:"mermaid",ul:"ul",...(0,t.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Erstelle die Klassen ",(0,s.jsx)(n.code,{children:"Person"}),", ",(0,s.jsx)(n.code,{children:"TelephoneNumber"})," und ",(0,s.jsx)(n.code,{children:"TelephoneBook"})," anhand\ndes abgebildeten Klassendiagramms"]}),"\n",(0,s.jsx)(n.li,{children:"Erstelle eine ausf\xfchrbare Klasse, welche ein Telefonbuch mit mehreren\nEintr\xe4gen erzeugt und zu eingegebenen Namen die dazugeh\xf6rigen Telefonnummern\nauf der Konsole ausgibt"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,s.jsx)(n.mermaid,{value:"classDiagram\n TelephoneBook o-- Person\n TelephoneBook o-- TelephoneNumber\n\n class Person {\n <>\n -name String\n }\n\n class TelephoneNumber {\n <>\n -value String\n }\n\n class TelephoneBook {\n <>\n -entries Map~Person‚ TelephoneNumber~\n +addEntry(person Person, telephoneNumber TelephoneNumber) void\n +getTelephoneNumberByName(name String) TelephoneNumber\n }"}),"\n",(0,s.jsx)(n.h2,{id:"hinweise-zur-klasse-telephonebook",children:"Hinweise zur Klasse TelephoneBook"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Die Methode ",(0,s.jsx)(n.code,{children:"void addEntry(person: Person, telephoneNumber: TelephoneNumber)"}),"\nsoll einen Eintrag im Telefonbuch anlegen"]}),"\n",(0,s.jsxs)(n.li,{children:["Die Methode ",(0,s.jsx)(n.code,{children:"TelephoneNumber getTelephoneNumberByName(name: String)"})," soll die\nTelefonnummer zum eingehenden Namen zur\xfcckgeben"]}),"\n"]}),"\n",(0,s.jsx)(a.Z,{pullRequest:"59",branchSuffix:"maps/01"})]})}function p(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},85162:(e,n,r)=>{r.d(n,{Z:()=>l});r(67294);var s=r(34334);const t={tabItem:"tabItem_Ymn6"};var a=r(85893);function l(e){let{children:n,hidden:r,className:l}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.Z)(t.tabItem,l),hidden:r,children:n})}},74866:(e,n,r)=>{r.d(n,{Z:()=>k});var s=r(67294),t=r(34334),a=r(12466),l=r(16550),i=r(20469),o=r(91980),u=r(67392),c=r(50012);function d(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:n,children:r}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:r,attributes:s,default:t}}=e;return{value:n,label:r,attributes:s,default:t}}))}(r);return function(e){const n=(0,u.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,r])}function h(e){let{value:n,tabValues:r}=e;return r.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:r}=e;const t=(0,l.k6)(),a=function(e){let{queryString:n=!1,groupId:r}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:n,groupId:r});return[(0,o._X)(a),(0,s.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(t.location.search);n.set(a,e),t.replace({...t.location,search:n.toString()})}),[a,t])]}function b(e){const{defaultValue:n,queryString:r=!1,groupId:t}=e,a=p(e),[l,o]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!h({value:n,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=r.find((e=>e.default))??r[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:a}))),[u,d]=m({queryString:r,groupId:t}),[b,f]=function(e){let{groupId:n}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(n),[t,a]=(0,c.Nk)(r);return[t,(0,s.useCallback)((e=>{r&&a.set(e)}),[r,a])]}({groupId:t}),g=(()=>{const e=u??b;return h({value:e,tabValues:a})?e:null})();(0,i.Z)((()=>{g&&o(g)}),[g]);return{selectedValue:l,selectValue:(0,s.useCallback)((e=>{if(!h({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);o(e),d(e),f(e)}),[d,f,a]),tabValues:a}}var f=r(72389);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=r(85893);function x(e){let{className:n,block:r,selectedValue:s,selectValue:l,tabValues:i}=e;const o=[],{blockElementScrollPositionUntilNextRender:u}=(0,a.o5)(),c=e=>{const n=e.currentTarget,r=o.indexOf(n),t=i[r].value;t!==s&&(u(n),l(t))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const r=o.indexOf(e.currentTarget)+1;n=o[r]??o[0];break}case"ArrowLeft":{const r=o.indexOf(e.currentTarget)-1;n=o[r]??o[o.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.Z)("tabs",{"tabs--block":r},n),children:i.map((e=>{let{value:n,label:r,attributes:a}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>o.push(e),onKeyDown:d,onClick:c,...a,className:(0,t.Z)("tabs__item",g.tabItem,a?.className,{"tabs__item--active":s===n}),children:r??n},n)}))})}function j(e){let{lazy:n,children:r,selectedValue:t}=e;const a=(Array.isArray(r)?r:[r]).filter(Boolean);if(n){const e=a.find((e=>e.props.value===t));return e?(0,s.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:a.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==t})))})}function T(e){const n=b(e);return(0,v.jsxs)("div",{className:(0,t.Z)("tabs-container",g.tabList),children:[(0,v.jsx)(x,{...e,...n}),(0,v.jsx)(j,{...e,...n})]})}function k(e){const n=(0,f.Z)();return(0,v.jsx)(T,{...e,children:d(e.children)},String(n))}},85521:(e,n,r)=>{r.d(n,{Z:()=>o});r(67294);var s=r(74866),t=r(85162),a=r(39960),l=r(9286),i=r(85893);function o(e){let{pullRequest:n,branchSuffix:r}=e;return(0,i.jsxs)(s.Z,{children:[(0,i.jsxs)(t.Z,{value:"exercise",label:"Exercise",default:!0,children:[(0,i.jsx)(l.Z,{language:"console",children:`git switch exercises/${r}`}),(0,i.jsx)(a.Z,{to:`https://gitpod.io/#https://github.com/jappuccini/java-exercises/blob/exercises/${r}/Exercise.java`,children:(0,i.jsx)("img",{alt:"Open in Gitpod",src:"https://gitpod.io/button/open-in-gitpod.svg"})})]}),(0,i.jsxs)(t.Z,{value:"solution",label:"Solution",children:[(0,i.jsx)(l.Z,{language:"console",children:`git switch solutions/${r}`}),(0,i.jsx)(a.Z,{to:`https://gitpod.io/#https://github.com/jappuccini/java-exercises/blob/solutions/${r}/Exercise.java`,children:(0,i.jsx)("img",{alt:"Open in Gitpod",src:"https://gitpod.io/button/open-in-gitpod.svg"})})]}),(0,i.jsxs)(t.Z,{value:"pullrequest",label:"Pull Request",children:["Alle \xa0\xc4nderungen zwischen der Aufgabe und der L\xf6sung findest du im Pull Request"," ",(0,i.jsxs)(a.Z,{to:`https://github.com/jappuccini/java-exercises/pull/${n}/files?diff=split`,children:["PR#",n]})]})]})}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/203119e9.40e341ba.js b/pr-preview/pr-75/assets/js/203119e9.40e341ba.js
deleted file mode 100644
index d8c4ee1463..0000000000
--- a/pr-preview/pr-75/assets/js/203119e9.40e341ba.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[626],{11730:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>u,frontMatter:()=>s,metadata:()=>l,toc:()=>c});var o=n(85893),i=n(11151);const s={title:"UnitTests04",description:""},r=void 0,l={id:"exercises/unit-tests/unit-tests04",title:"UnitTests04",description:"",source:"@site/docs/exercises/unit-tests/unit-tests04.md",sourceDirName:"exercises/unit-tests",slug:"/exercises/unit-tests/unit-tests04",permalink:"/java-docs/pr-preview/pr-75/exercises/unit-tests/unit-tests04",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exercises/unit-tests/unit-tests04.md",tags:[],version:"current",frontMatter:{title:"UnitTests04",description:""},sidebar:"exercisesSidebar",previous:{title:"UnitTests03",permalink:"/java-docs/pr-preview/pr-75/exercises/unit-tests/unit-tests03"},next:{title:"Datenstr\xf6me (IO-Streams)",permalink:"/java-docs/pr-preview/pr-75/exercises/io-streams/"}},d={},c=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Hinweise zur Klasse BookCollectionTest",id:"hinweise-zur-klasse-bookcollectiontest",level:2},{value:"Hinweis",id:"hinweis",level:2}];function a(e){const t={a:"a",code:"code",h2:"h2",li:"li",mermaid:"mermaid",p:"p",ul:"ul",...(0,i.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:["Erstelle die JUnit5-Testklasse ",(0,o.jsx)(t.code,{children:"BookCollectionTest"})," anhand des abgebildeten\nKlassendiagramms."]}),"\n",(0,o.jsx)(t.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,o.jsx)(t.mermaid,{value:"classDiagram\n BookCollection o-- Author\n BookCollection o-- Book\n BookCollectionTest o-- BookCollection\n\n class Author {\n <>\n -name String\n }\n\n class Book {\n <>\n -title String\n }\n\n class BookCollection {\n <>\n -collection Map~Author, List~Book~~\n +addAuthor(author Author) void\n +addBook(author Author, book Book) void\n +getMostDiligentAuthor() Optional~Author~\n +getBookByTitle(title String) Optional~Book~\n }\n\n class BookCollectionTest {\n -bookCollection BookCollection\n -stephenKing Author\n -georgeRRMartin Author\n -it Book\n -aGameOfThrones Book\n -aClashOfKings Book\n +setUp void\n +testAddAuthor() void\n +testAddBook() void\n +testGetMostDiligentAuthor1() void\n +testGetMostDiligentAuthor2() void\n +testGetBookByTitle() void\n }"}),"\n",(0,o.jsxs)(t.h2,{id:"hinweise-zur-klasse-bookcollectiontest",children:["Hinweise zur Klasse ",(0,o.jsx)(t.code,{children:"BookCollectionTest"})]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:["Die Lebenszyklus-Methode ",(0,o.jsx)(t.code,{children:"void setUp()"})," soll den Attributen der Testklasse\npassende Werte zuweisen"]}),"\n",(0,o.jsxs)(t.li,{children:["Die Testmethode ",(0,o.jsx)(t.code,{children:"void testAddAuthor()"})," soll pr\xfcfen, ob beim Ausf\xfchren der\nMethode ",(0,o.jsx)(t.code,{children:"void addAuthor(author: Author)"})," mit einem Autoren, der bereits in der\nB\xfcchersammlung vorhanden ist, die Ausnahme ",(0,o.jsx)(t.code,{children:"DuplicateKeyException"})," ausgel\xf6st\nwird"]}),"\n",(0,o.jsxs)(t.li,{children:["Die Testmethode ",(0,o.jsx)(t.code,{children:"void testAddBook()"})," soll pr\xfcfen, ob nach dem Ausf\xfchren der\nMethode ",(0,o.jsx)(t.code,{children:"void addBook(author: Author, book: Book)"})," der entsprechende Eintrag\naktualisiert wurde"]}),"\n",(0,o.jsxs)(t.li,{children:["Die Testmethode ",(0,o.jsx)(t.code,{children:"void testGetMostDiligentAuthor1()"})," soll pr\xfcfen, ob beim\nAusf\xfchren der Methode ",(0,o.jsx)(t.code,{children:"Optional getMostDiligentAuthor()"})," auf eine\nbef\xfcllte B\xfcchersammlung der Autor mit den meisten B\xfcchern in der\nB\xfcchersammlung als Optional zur\xfcckgegeben wird"]}),"\n",(0,o.jsxs)(t.li,{children:["Die Testmethode ",(0,o.jsx)(t.code,{children:"void testGetMostDiligentAuthor2()"})," soll pr\xfcfen, ob beim\nAusf\xfchren der Methode ",(0,o.jsx)(t.code,{children:"Optional getMostDiligentAuthor()"})," auf eine\nleere B\xfcchersammlung ein leeres Optional zur\xfcckgegeben wird"]}),"\n",(0,o.jsxs)(t.li,{children:["Die Testmethode ",(0,o.jsx)(t.code,{children:"void testGetBookByTitle()"})," soll pr\xfcfen, ob beim Ausf\xfchren der\nMethode ",(0,o.jsx)(t.code,{children:"Optional getBookByTitle(title: String)"})," mit einem Buchtitel zu\neinem vorhandenen Buch das entsprechende Buch als Optional zur\xfcckgegeben wird\nund ob beim Ausf\xfchren der Methode\n",(0,o.jsx)(t.code,{children:"Optional getBookByTitle(title: String)"})," mit einem Buchtitel zu einem\nnicht vorhandenen Buch ein leeres Optional zur\xfcckgegeben wird"]}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"hinweis",children:"Hinweis"}),"\n",(0,o.jsxs)(t.p,{children:["Verweden die Klasse ",(0,o.jsx)(t.code,{children:"BookCollection"})," aus \xdcbungsaufgabe\n",(0,o.jsx)(t.a,{href:"../optionals/optionals01",children:"Optionals01"}),"."]})]})}function u(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},11151:(e,t,n)=>{n.d(t,{Z:()=>l,a:()=>r});var o=n(67294);const i={},s=o.createContext(i);function r(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/203119e9.d0c82a0c.js b/pr-preview/pr-75/assets/js/203119e9.d0c82a0c.js
new file mode 100644
index 0000000000..5e7e622c72
--- /dev/null
+++ b/pr-preview/pr-75/assets/js/203119e9.d0c82a0c.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[626],{11730:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var o=n(85893),s=n(11151);const i={title:"UnitTests04",description:""},r=void 0,l={id:"exercises/unit-tests/unit-tests04",title:"UnitTests04",description:"",source:"@site/docs/exercises/unit-tests/unit-tests04.md",sourceDirName:"exercises/unit-tests",slug:"/exercises/unit-tests/unit-tests04",permalink:"/java-docs/pr-preview/pr-75/exercises/unit-tests/unit-tests04",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exercises/unit-tests/unit-tests04.md",tags:[],version:"current",frontMatter:{title:"UnitTests04",description:""},sidebar:"exercisesSidebar",previous:{title:"UnitTests03",permalink:"/java-docs/pr-preview/pr-75/exercises/unit-tests/unit-tests03"},next:{title:"Datenstr\xf6me (IO-Streams)",permalink:"/java-docs/pr-preview/pr-75/exercises/io-streams/"}},d={},c=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Hinweise zur Klasse BookCollectionTest",id:"hinweise-zur-klasse-bookcollectiontest",level:2},{value:"Hinweis",id:"hinweis",level:2}];function a(e){const t={a:"a",code:"code",h2:"h2",li:"li",mermaid:"mermaid",p:"p",ul:"ul",...(0,s.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:["Erstelle die JUnit5-Testklasse ",(0,o.jsx)(t.code,{children:"BookCollectionTest"})," anhand des abgebildeten\nKlassendiagramms."]}),"\n",(0,o.jsx)(t.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,o.jsx)(t.mermaid,{value:"classDiagram\n BookCollection o-- Author\n BookCollection o-- Book\n BookCollectionTest o-- BookCollection\n\n class Author {\n <>\n -name String\n }\n\n class Book {\n <>\n -title String\n }\n\n class BookCollection {\n <>\n -collection Map~Author‚ List~Book~~\n +addAuthor(author Author) void\n +addBook(author Author, book Book) void\n +getMostDiligentAuthor() Optional~Author~\n +getBookByTitle(title String) Optional~Book~\n }\n\n class BookCollectionTest {\n -bookCollection BookCollection\n -stephenKing Author\n -georgeRRMartin Author\n -it Book\n -aGameOfThrones Book\n -aClashOfKings Book\n +setUp void\n +testAddAuthor() void\n +testAddBook() void\n +testGetMostDiligentAuthor1() void\n +testGetMostDiligentAuthor2() void\n +testGetBookByTitle() void\n }"}),"\n",(0,o.jsxs)(t.h2,{id:"hinweise-zur-klasse-bookcollectiontest",children:["Hinweise zur Klasse ",(0,o.jsx)(t.code,{children:"BookCollectionTest"})]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:["Die Lebenszyklus-Methode ",(0,o.jsx)(t.code,{children:"void setUp()"})," soll den Attributen der Testklasse\npassende Werte zuweisen"]}),"\n",(0,o.jsxs)(t.li,{children:["Die Testmethode ",(0,o.jsx)(t.code,{children:"void testAddAuthor()"})," soll pr\xfcfen, ob beim Ausf\xfchren der\nMethode ",(0,o.jsx)(t.code,{children:"void addAuthor(author: Author)"})," mit einem Autoren, der bereits in der\nB\xfcchersammlung vorhanden ist, die Ausnahme ",(0,o.jsx)(t.code,{children:"DuplicateKeyException"})," ausgel\xf6st\nwird"]}),"\n",(0,o.jsxs)(t.li,{children:["Die Testmethode ",(0,o.jsx)(t.code,{children:"void testAddBook()"})," soll pr\xfcfen, ob nach dem Ausf\xfchren der\nMethode ",(0,o.jsx)(t.code,{children:"void addBook(author: Author, book: Book)"})," der entsprechende Eintrag\naktualisiert wurde"]}),"\n",(0,o.jsxs)(t.li,{children:["Die Testmethode ",(0,o.jsx)(t.code,{children:"void testGetMostDiligentAuthor1()"})," soll pr\xfcfen, ob beim\nAusf\xfchren der Methode ",(0,o.jsx)(t.code,{children:"Optional getMostDiligentAuthor()"})," auf eine\nbef\xfcllte B\xfcchersammlung der Autor mit den meisten B\xfcchern in der\nB\xfcchersammlung als Optional zur\xfcckgegeben wird"]}),"\n",(0,o.jsxs)(t.li,{children:["Die Testmethode ",(0,o.jsx)(t.code,{children:"void testGetMostDiligentAuthor2()"})," soll pr\xfcfen, ob beim\nAusf\xfchren der Methode ",(0,o.jsx)(t.code,{children:"Optional getMostDiligentAuthor()"})," auf eine\nleere B\xfcchersammlung ein leeres Optional zur\xfcckgegeben wird"]}),"\n",(0,o.jsxs)(t.li,{children:["Die Testmethode ",(0,o.jsx)(t.code,{children:"void testGetBookByTitle()"})," soll pr\xfcfen, ob beim Ausf\xfchren der\nMethode ",(0,o.jsx)(t.code,{children:"Optional getBookByTitle(title: String)"})," mit einem Buchtitel zu\neinem vorhandenen Buch das entsprechende Buch als Optional zur\xfcckgegeben wird\nund ob beim Ausf\xfchren der Methode\n",(0,o.jsx)(t.code,{children:"Optional getBookByTitle(title: String)"})," mit einem Buchtitel zu einem\nnicht vorhandenen Buch ein leeres Optional zur\xfcckgegeben wird"]}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"hinweis",children:"Hinweis"}),"\n",(0,o.jsxs)(t.p,{children:["Verweden die Klasse ",(0,o.jsx)(t.code,{children:"BookCollection"})," aus \xdcbungsaufgabe\n",(0,o.jsx)(t.a,{href:"../optionals/optionals01",children:"Optionals01"}),"."]})]})}function u(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},11151:(e,t,n)=>{n.d(t,{Z:()=>l,a:()=>r});var o=n(67294);const s={},i=o.createContext(s);function r(e){const t=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(i.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/233bdb49.4d4c9824.js b/pr-preview/pr-75/assets/js/233bdb49.4d4c9824.js
deleted file mode 100644
index a485061ac9..0000000000
--- a/pr-preview/pr-75/assets/js/233bdb49.4d4c9824.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[7200],{99297:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>t,default:()=>p,frontMatter:()=>a,metadata:()=>o,toc:()=>c});var r=i(85893),s=i(11151);const a={title:"Bibliothek",description:"",tags:["inheritance","polymorphy","exceptions","records","maps","optionals"]},t=void 0,o={id:"exam-exercises/exam-exercises-java2/library",title:"Bibliothek",description:"",source:"@site/docs/exam-exercises/exam-exercises-java2/library.md",sourceDirName:"exam-exercises/exam-exercises-java2",slug:"/exam-exercises/exam-exercises-java2/library",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/library",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exam-exercises/exam-exercises-java2/library.md",tags:[{label:"inheritance",permalink:"/java-docs/pr-preview/pr-75/tags/inheritance"},{label:"polymorphy",permalink:"/java-docs/pr-preview/pr-75/tags/polymorphy"},{label:"exceptions",permalink:"/java-docs/pr-preview/pr-75/tags/exceptions"},{label:"records",permalink:"/java-docs/pr-preview/pr-75/tags/records"},{label:"maps",permalink:"/java-docs/pr-preview/pr-75/tags/maps"},{label:"optionals",permalink:"/java-docs/pr-preview/pr-75/tags/optionals"}],version:"current",frontMatter:{title:"Bibliothek",description:"",tags:["inheritance","polymorphy","exceptions","records","maps","optionals"]},sidebar:"examExercisesSidebar",previous:{title:"Lego-Baustein",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/lego-brick"},next:{title:"Messdaten",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/measurement-data"}},l={},c=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Allgemeine Hinweise",id:"allgemeine-hinweise",level:2},{value:"Hinweis zur Klasse EBook",id:"hinweis-zur-klasse-ebook",level:2},{value:"Hinweise zur Klasse Library",id:"hinweise-zur-klasse-library",level:2}];function d(e){const n={code:"code",h2:"h2",li:"li",mermaid:"mermaid",p:"p",ul:"ul",...(0,s.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Setze das abgebildete Klassendiagramm vollst\xe4ndig um. Erstelle zum Testen eine\nausf\xfchrbare Klasse und/oder eine Testklasse."}),"\n",(0,r.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n Library o-- Book\n Library o-- Status\n Book <|-- EBook\n Book <|-- PaperBook\n Book o-- Author\n EBook o-- FileFormat\n\n class Library {\n <>\n -name String\n -books Map~Book, Status~\n +addBook(book Book) void\n +getBookByTitle(title String) Optional~Book~\n +getPaperBooksByStatus(status Status) List~PaperBook~\n }\n\n class Status {\n <>\n AVAILABLE = verf\xfcgbar\n LENT = verliehen\n -description String\n }\n\n class Book {\n <>\n -id UUID\n -author Author\n -title String\n +Book(author Author, title String)\n }\n\n class EBook {\n -fileFormat FileFormat\n -fileSizeInKB int\n +EBook(author Author, title String, fileFormat FileFormat, fileSizeInKB int)\n }\n\n class PaperBook {\n -pages int\n +PaperBook(author Author, title String, pages int)\n }\n\n class Author {\n <>\n -name String\n -nationality String\n }\n\n class FileFormat {\n <>\n AZW = Amazon Kindle\n EPUB = Electronic Publication\n LRF = Portable Reader File\n -description String\n }"}),"\n",(0,r.jsx)(n.h2,{id:"allgemeine-hinweise",children:"Allgemeine Hinweise"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Aus Gr\xfcnden der \xdcbersicht werden im Klassendiagramm keine Getter und\nObject-Methoden dargestellt"}),"\n",(0,r.jsx)(n.li,{children:"So nicht anders angegeben, sollen Konstruktoren, Setter, Getter sowie die\nObject-Methoden wie gewohnt implementiert werden"}),"\n",(0,r.jsxs)(n.li,{children:["Die statische Methode ",(0,r.jsx)(n.code,{children:"UUID randomUUID()"})," der Klasse ",(0,r.jsx)(n.code,{children:"UUID"})," gibt eine zuf\xe4llig\nerstellte UUID zur\xfcck"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"hinweis-zur-klasse-ebook",children:"Hinweis zur Klasse EBook"}),"\n",(0,r.jsxs)(n.p,{children:["Der Konstruktor soll alle Attribute initialisieren. F\xfcr den Fall, dass die\neingehende Dateigr\xf6\xdfe kleiner gleich Null ist, soll die Ausnahme\n",(0,r.jsx)(n.code,{children:"WrongFileSizeException"})," ausgel\xf6st werden."]}),"\n",(0,r.jsx)(n.h2,{id:"hinweise-zur-klasse-library",children:"Hinweise zur Klasse Library"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void addBook(book: Book)"})," soll der B\xfccherliste (",(0,r.jsx)(n.code,{children:"books"}),") das\neingehende Buch mit dem Status ",(0,r.jsx)(n.code,{children:"verf\xfcgbar"})," hinzuf\xfcgen"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"Optional getBookByTitle(title: String)"})," soll das Buch zum\neingehenden Titel als Optional zur\xfcckgeben"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"List getPaperBooksByStatus(status: Status)"})," soll alle\ngedruckten B\xfccher zum eingehenden Status zur\xfcckgeben"]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},11151:(e,n,i)=>{i.d(n,{Z:()=>o,a:()=>t});var r=i(67294);const s={},a=r.createContext(s);function t(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/233bdb49.9b29543c.js b/pr-preview/pr-75/assets/js/233bdb49.9b29543c.js
new file mode 100644
index 0000000000..62bdd9783c
--- /dev/null
+++ b/pr-preview/pr-75/assets/js/233bdb49.9b29543c.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[7200],{99297:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>t,default:()=>p,frontMatter:()=>a,metadata:()=>o,toc:()=>c});var r=i(85893),s=i(11151);const a={title:"Bibliothek",description:"",tags:["inheritance","polymorphy","exceptions","records","maps","optionals"]},t=void 0,o={id:"exam-exercises/exam-exercises-java2/library",title:"Bibliothek",description:"",source:"@site/docs/exam-exercises/exam-exercises-java2/library.md",sourceDirName:"exam-exercises/exam-exercises-java2",slug:"/exam-exercises/exam-exercises-java2/library",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/library",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exam-exercises/exam-exercises-java2/library.md",tags:[{label:"inheritance",permalink:"/java-docs/pr-preview/pr-75/tags/inheritance"},{label:"polymorphy",permalink:"/java-docs/pr-preview/pr-75/tags/polymorphy"},{label:"exceptions",permalink:"/java-docs/pr-preview/pr-75/tags/exceptions"},{label:"records",permalink:"/java-docs/pr-preview/pr-75/tags/records"},{label:"maps",permalink:"/java-docs/pr-preview/pr-75/tags/maps"},{label:"optionals",permalink:"/java-docs/pr-preview/pr-75/tags/optionals"}],version:"current",frontMatter:{title:"Bibliothek",description:"",tags:["inheritance","polymorphy","exceptions","records","maps","optionals"]},sidebar:"examExercisesSidebar",previous:{title:"Lego-Baustein",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/lego-brick"},next:{title:"Messdaten",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/measurement-data"}},l={},c=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Allgemeine Hinweise",id:"allgemeine-hinweise",level:2},{value:"Hinweis zur Klasse EBook",id:"hinweis-zur-klasse-ebook",level:2},{value:"Hinweise zur Klasse Library",id:"hinweise-zur-klasse-library",level:2}];function d(e){const n={code:"code",h2:"h2",li:"li",mermaid:"mermaid",p:"p",ul:"ul",...(0,s.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Setze das abgebildete Klassendiagramm vollst\xe4ndig um. Erstelle zum Testen eine\nausf\xfchrbare Klasse und/oder eine Testklasse."}),"\n",(0,r.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n Library o-- Book\n Library o-- Status\n Book <|-- EBook\n Book <|-- PaperBook\n Book o-- Author\n EBook o-- FileFormat\n\n class Library {\n <>\n -name String\n -books Map~Book‚ Status~\n +addBook(book Book) void\n +getBookByTitle(title String) Optional~Book~\n +getPaperBooksByStatus(status Status) List~PaperBook~\n }\n\n class Status {\n <>\n AVAILABLE = verf\xfcgbar\n LENT = verliehen\n -description String\n }\n\n class Book {\n <>\n -id UUID\n -author Author\n -title String\n +Book(author Author, title String)\n }\n\n class EBook {\n -fileFormat FileFormat\n -fileSizeInKB int\n +EBook(author Author, title String, fileFormat FileFormat, fileSizeInKB int)\n }\n\n class PaperBook {\n -pages int\n +PaperBook(author Author, title String, pages int)\n }\n\n class Author {\n <>\n -name String\n -nationality String\n }\n\n class FileFormat {\n <>\n AZW = Amazon Kindle\n EPUB = Electronic Publication\n LRF = Portable Reader File\n -description String\n }"}),"\n",(0,r.jsx)(n.h2,{id:"allgemeine-hinweise",children:"Allgemeine Hinweise"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Aus Gr\xfcnden der \xdcbersicht werden im Klassendiagramm keine Getter und\nObject-Methoden dargestellt"}),"\n",(0,r.jsx)(n.li,{children:"So nicht anders angegeben, sollen Konstruktoren, Setter, Getter sowie die\nObject-Methoden wie gewohnt implementiert werden"}),"\n",(0,r.jsxs)(n.li,{children:["Die statische Methode ",(0,r.jsx)(n.code,{children:"UUID randomUUID()"})," der Klasse ",(0,r.jsx)(n.code,{children:"UUID"})," gibt eine zuf\xe4llig\nerstellte UUID zur\xfcck"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"hinweis-zur-klasse-ebook",children:"Hinweis zur Klasse EBook"}),"\n",(0,r.jsxs)(n.p,{children:["Der Konstruktor soll alle Attribute initialisieren. F\xfcr den Fall, dass die\neingehende Dateigr\xf6\xdfe kleiner gleich Null ist, soll die Ausnahme\n",(0,r.jsx)(n.code,{children:"WrongFileSizeException"})," ausgel\xf6st werden."]}),"\n",(0,r.jsx)(n.h2,{id:"hinweise-zur-klasse-library",children:"Hinweise zur Klasse Library"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void addBook(book: Book)"})," soll der B\xfccherliste (",(0,r.jsx)(n.code,{children:"books"}),") das\neingehende Buch mit dem Status ",(0,r.jsx)(n.code,{children:"verf\xfcgbar"})," hinzuf\xfcgen"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"Optional getBookByTitle(title: String)"})," soll das Buch zum\neingehenden Titel als Optional zur\xfcckgeben"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"List getPaperBooksByStatus(status: Status)"})," soll alle\ngedruckten B\xfccher zum eingehenden Status zur\xfcckgeben"]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},11151:(e,n,i)=>{i.d(n,{Z:()=>o,a:()=>t});var r=i(67294);const s={},a=r.createContext(s);function t(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/5386c278.39a9af42.js b/pr-preview/pr-75/assets/js/5386c278.9275b25a.js
similarity index 54%
rename from pr-preview/pr-75/assets/js/5386c278.39a9af42.js
rename to pr-preview/pr-75/assets/js/5386c278.9275b25a.js
index e4b27fb2ff..560b17bee0 100644
--- a/pr-preview/pr-75/assets/js/5386c278.39a9af42.js
+++ b/pr-preview/pr-75/assets/js/5386c278.9275b25a.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[3083],{75265:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>u,frontMatter:()=>s,metadata:()=>t,toc:()=>o});var r=i(85893),a=i(11151);const s={title:"Steffen",description:"",sidebar_position:30,tags:[]},l=void 0,t={id:"additional-material/steffen",title:"Steffen",description:"",source:"@site/docs/additional-material/steffen.md",sourceDirName:"additional-material",slug:"/additional-material/steffen",permalink:"/java-docs/pr-preview/pr-75/additional-material/steffen",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/additional-material/steffen.md",tags:[],version:"current",sidebarPosition:30,frontMatter:{title:"Steffen",description:"",sidebar_position:30,tags:[]},sidebar:"additionalMaterialSidebar",previous:{title:"Klausurergebnisse",permalink:"/java-docs/pr-preview/pr-75/additional-material/daniel-java2/exam-results"}},d={},o=[{value:"Java I",id:"java-i",level:2},{value:"Java II",id:"java-ii",level:2},{value:"Demos",id:"demos",level:2},{value:"Klausurvorbereitung Java II",id:"klausurvorbereitung-java-ii",level:2},{value:"Aufgabe Optionals",id:"aufgabe-optionals",level:2},{value:"Klassendiagramm",id:"klassendiagramm",level:3},{value:"Aufgabe Lambdafunktionen",id:"aufgabe-lambdafunktionen",level:2},{value:"Klassendiagramm",id:"klassendiagramm-1",level:3},{value:"Aufgabe Streams",id:"aufgabe-streams",level:2},{value:"Klassendiagramm",id:"klassendiagramm-2",level:3},{value:"Hinweise zur Klasse PhoneStore",id:"hinweise-zur-klasse-phonestore",level:2},{value:"Klausurvorbereitung Java I",id:"klausurvorbereitung-java-i",level:2},{value:"08.03.2023",id:"08032023",level:3},{value:"14.03.2023",id:"14032023",level:3},{value:"Aufgabe Array",id:"aufgabe-array",level:4},{value:"Aufgabe Exception",id:"aufgabe-exception",level:4},{value:"21.03.2023",id:"21032023",level:3},{value:"Aufgabe abstrakte Klasse, Enum",id:"aufgabe-abstrakte-klasse-enum",level:4},{value:"Aufgabe Comparator",id:"aufgabe-comparator",level:4}];function c(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",mermaid:"mermaid",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"java-i",children:"Java I"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/intro",children:"Einleitung"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/datatypes-and-dataobjects",children:"Datentypen und Datenobjekte"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/methods-and-operators",children:"Methoden und Operatoren"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/if-and-switch",children:"Kontrollstrukturen und Arrays"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/math-random-scanner",children:"Math, Random und Scanner"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/classes-and-objects",children:"Klassen und Objekte"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/constructor-and-static",children:"Konstruktor und static"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/class-diagram-java-api-enum",children:"Java API, Enum, Klassendiagramm, Aktivit\xe4tsdiagramm"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/Inheritance",children:"Vererbung"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/polymorphy",children:"Polymorphie"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/abstract-and-final",children:"Abstrakte und finale Klassen"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/interfaces",children:"Interfaces"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/exceptions",children:"Exceptions"})}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"java-ii",children:"Java II"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/recap",children:"Wiederholung und Klausurbesprechung 10.08.23"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/lambda",children:"Innere Klassen und Lambda Funktionen 17.08.23"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/records-optionals",children:"Records und Optionals 18.08.23"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/generics-maps",children:"Generics und Maps 24.08.23"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/stream-api",children:"Stream API 31.08.23 & 01.09.23"})}),"\n",(0,r.jsx)(n.li,{children:"Probeklausur 07.09.23"}),"\n",(0,r.jsx)(n.li,{children:"Probeklausur 14.09.23"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"demos",children:"Demos"}),"\n",(0,r.jsx)(n.p,{children:"Die Endergebnisse der Demos findet ihr in folgendem Branch:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"git switch demos/steffen\n"})}),"\n",(0,r.jsx)(n.h2,{id:"klausurvorbereitung-java-ii",children:"Klausurvorbereitung Java II"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.a,{target:"_blank",href:i(37226).Z+"",children:"Cheatsheet Java II"})}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:"Altklausuren 2022 Q3 - Klausur Java 2 Aufgabe 3"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'public class PlanetQueries {\n\n public static ArrayList planets = Planet.getPlantes();\n\n public static void a() {\n PlanetQueries.planets.stream()\n .filter(p -> p.moons() > 5)\n .forEach(p -> {\n System.out.println(p.name() + ": " + p.moons());\n });\n }\n\n public static OptionalDouble b() {\n return PlanetQueries.planets.stream()\n .filter(p -> p.type() == Type.GAS_PLANET)\n .mapToDouble(p -> p.diameter())\n .average();\n }\n\n public static List c() {\n return PlanetQueries.planets.stream()\n .sorted((p1, p2) -> Double.compare(p2.mass(), p1.mass()))\n .toList();\n }\n\n public static boolean d() {\n return PlanetQueries.planets.stream()\n .allMatch(p -> p.moons() > 0);\n }\n\n public static void e() {\n Map> planetsMap = PlanetQueries.planets.stream()\n .collect(Collectors.groupingBy(p -> p.type()));\n planetsMap.entrySet()\n .stream()\n .forEach(entry -> {\n System.out.println(entry.getKey() + ":" + entry.getValue());\n });\n }\n}\n'})}),"\n",(0,r.jsxs)(n.ol,{start:"2",children:["\n",(0,r.jsx)(n.li,{children:"Altklausuren 2022 Q3 - Probeklausur Java 2 Klausur Aufgabe 3"}),"\n",(0,r.jsx)(n.li,{children:"Altklausuren 2023 Q1 - Wiederholklausur 2 Java 2 Klausur Aufgabe 3"}),"\n",(0,r.jsx)(n.li,{children:"Altklausuren 2023 Q1 - Wiederholklausur Java 2 Klausur Aufgabe 3"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"aufgabe-optionals",children:"Aufgabe Optionals"}),"\n",(0,r.jsx)(n.h3,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n class Car {\n +name String\n +brand String\n +addition Optional~String~\n +Car(name String, brand String)\n +Car(name String, brand String, addition String)\n +toString() String\n }"}),"\n",(0,r.jsxs)(n.p,{children:["** Hinweise zu den Konstruktoren** ",(0,r.jsx)("br",{})," Die Konstruktoren sollen alle Attribute\ninitialisieren."]}),"\n",(0,r.jsxs)(n.p,{children:["** Hinweise zur Methode toString ** ",(0,r.jsx)("br",{})," Die Methode toString soll die\nAttribute brand, model und addition zur\xfcckgeben. Die Attribute sollen durch eine\nLeertaste getrennt sein. Falls addition keinen Wert besitz, soll dieser\nignoriert werden."]}),"\n",(0,r.jsx)(n.p,{children:'Erstelle eine ausf\xfchrbare Klasse in der ein Auto mit der Marke "Mercedes", dem\nModell "CLA45" und dem Zusatz "AMG" initialisiert wird. Gib das Auto in der\nKonsole aus. Entferne den Zusatz von dem Auto und gebe das Auto erneut in der\nKonsole aus.'}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'public class Car {\n public String name;\n public String brand;\n public Optional addition;\n\n public Car(String name, String brand) {\n this.name = name;\n this.brand = brand;\n this.addition = Optional.empty();\n }\n\n public Car(String name, String brand, String addition) {\n this.name = name;\n this.brand = brand;\n this.addition = Optional.ofNullable(addition);\n }\n\n public String toString() {\n if (addition.isPresent()) {\n return brand + " " + name + addition.get();\n } else {\n return brand + " " + name;\n }\n }\n}\n'})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'public class Main {\n public static void main(String[] args) {\n Car benz = new Car("CLA45", "Mercedes", "AMG");\n System.out.println(benz.toString());\n benz.addition = Optional.empty();\n System.out.println(benz.toString());\n }\n}\n'})}),"\n",(0,r.jsx)(n.h2,{id:"aufgabe-lambdafunktionen",children:"Aufgabe Lambdafunktionen"}),"\n",(0,r.jsx)(n.h3,{id:"klassendiagramm-1",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n Helper -- Animal\n Data -- Animal\n Task2 -- Animal\n Task2 -- Data\n Task2 -- Helper\n\n class Helper {\n +isNewBorn UNKNOWN$\n +toOutput UNKNOWN$\n +isHigherThan(size: int)$ Predicate~Student~\n }\n\n class Animal {\n <>\n +firstName String\n +lastName String\n +size int\n }\n\n class Data {\n +getAnimals()$ Stream~Animal~\n }\n\n class Task2 {\n +main(args: String[])$ void\n }"}),"\n",(0,r.jsxs)(n.p,{children:["** Hinweise zur Klasse Helper** ",(0,r.jsx)("br",{})," Im Klassendiagramm sind keine\nR\xfcckgabetypen f\xfcr die statischen Attribute angegeben. Gib f\xfcr jedes Attribut den\ngeeigneten Typ an."]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Das Attribut ",(0,r.jsx)(n.strong,{children:"isNewBorn"})," soll eine Lambdafunktion enthalten die ermittelt,\nob ein Tier j\xfcnger als 1 Jahr alt ist."]}),"\n",(0,r.jsxs)(n.li,{children:["Das Attribut ",(0,r.jsx)(n.strong,{children:"toOutput"}),' soll eine Lambdafunktion enthalten, die ein Tier in\nfolgenden String konvertiert: "firstName lastName ist size Zentimeter gro\xdf."']}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"isHigherThan"})," soll eine Lambdafunktion zur\xfcckgeben, die\nabh\xe4ngig vom Parameter size \xfcberpr\xfcft, ob ein Tier gr\xf6\xdfer als die angegebene\nGr\xf6\xdfe ist."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Hinweise zur Klasse Data"})," ",(0,r.jsx)("br",{})]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"getAnimals"})," soll einen Stream von einem einzelnen Tier mit den\nWerten deiner Wahl zur\xfcckgeben."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Hinweise zur Klasse Task2"})," ",(0,r.jsx)("br",{})," Verwende f\xfcr die nachfolgende Abfolge die\nMethoden der Klassen Data und Helper. Erzeuge einen Stream von Tieren und\nfiltere jene heraus, die Gr\xf6\xdfer als 50 Zentimeter sind. Gib anschlie\xdfend den\nvollen Namen und die Gr\xf6\xdfe der Tiere in der Konsole aus."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"public record Animal(String firstName, String lastName, int age, int size) {}\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'public class Data {\n public static Stream getAnimals() {\n return Stream.of(new Animal("Steffen", "Merk", 28, 170));\n }\n}\n'})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'public class Helper {\n public static Predicate isNewBorn = animal -> animal.age() < 1;\n public static Function toOutput = animal -> animal.firstName()\n + " " + animal.lastName() + " ist " + animal.size() + " Zentimeter gro\xdf";\n\n public static Predicate isHigherThan(int size) {\n return animal -> animal.size() > size;\n }\n}\n'})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"public class Task2 {\n public static void main(String[] args) {\n Data.getAnimals()\n .filter(Helper.isHigherThan(50))\n .map(Helper.toOutput)\n .forEach(System.out::println);\n }\n}\n"})}),"\n",(0,r.jsx)(n.h2,{id:"aufgabe-streams",children:"Aufgabe Streams"}),"\n",(0,r.jsx)(n.h3,{id:"klassendiagramm-2",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n direction LR\n\n ConnectionType -- Phone\n Phone -- Data\n Phone -- Brand\n Phone -- PhoneStore\n\n class ConnectionType {\n <>\n TYPC\n THUNDERBOLT\n MICRO\n +isModern() boolean\n }\n\n class Phone {\n <>\n +brand Brand\n +connectionType ConnectionType\n +cameras int\n +batterySize int\n +cpuPower int\n +price double\n }\n\n class Data {\n +gePhones()$ ArrayList~Phone~\n }\n\n class Brand {\n <>\n APPLE\n SAMSUNG\n HUAWEI\n }\n\n class PhoneStore {\n -phones ArrayList~Phone~\n +PhoneStore(phones: ArrayList~Phone~)\n +q1() Phone~Car~\n +q2() OptionalDouble\n +q3(maxPrice: double) List~Phone~\n +q4() Map~String, Phone~\n +q5() Map~String, List~Phone~~\n }"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"public class PhoneStore {\n private ArrayList phones;\n\n public PhoneStore(ArrayList phones) {\n this.phones = phones;\n }\n\n public List q1() {\n return phones.stream()\n .filter(p -> p.brand() == Brand.HUAWEI)\n .filter(p -> p.cameras() > 3)\n .sorted((p1, p2) -> Integer.compare(p2.cpuPower(), p1.cpuPower()))\n .limit(3)\n .sorted((p1, p2) -> Double.compare(p2.price(), p1.price()))\n .toList();\n }\n\n public OptionalDouble q2() {\n return phones.stream()\n .filter(p -> p.batterySize() > 2500)\n .mapToInt(p -> p.cameras())\n .average();\n }\n\n public List q3(double maxPrice) {\n return phones.stream()\n .filter(p -> p.price() <= maxPrice)\n .filter(p -> p.connectionType().isModern())\n .filter(p -> p.cpuPower() < 2400)\n .sorted((p1, p2) -> Double.compare(p1.price(), p2.price()))\n .toList();\n }\n\n public Map q4() {\n return phones.stream()\n .collect(Collectors.toMap(\n p -> p.brand().name() + p.connectionType().name(),\n p -> p));\n }\n\n public Map> q5() {\n return phones.stream()\n .collect(Collectors.groupingBy(p -> p.connectionType()));\n }\n\n}\n"})}),"\n",(0,r.jsx)(n.h2,{id:"hinweise-zur-klasse-phonestore",children:"Hinweise zur Klasse PhoneStore"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren."}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"q1"})," soll die drei Leistungsst\xe4rksten (CPU Power) Smart Phones\nder Marke Huawei, absteigend nach dem Preis zur\xfcckgeben, welche mehr als 3\nKameras haben."]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"q2"})," soll die durchschnittliche Kameraanzahl aller Smart Phones\nzur\xfcckgeben, die einen Akku von 2500 oder mehr haben."]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"q3"})," soll die Smart Phones aufsteigend nach Preis zur\xfcckgeben,\ndie den ",(0,r.jsx)(n.strong,{children:"maxPrice"})," nicht \xfcberschreiten, einen modernen Anschlusstyp haben\nund weniger als 2400 Leistung (CPU Power) haben."]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"q4"})," soll eine Map zur\xfcckgeben. Der Schl\xfcssel soll aus dem\nMarkennamen und dem Anschlusstyp zusammengesetzt werden. Als Wert soll das\nAuto zur\xfcckgegeben werden."]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"q5"})," soll eine Map zur\xfcckgeben, welche alle Smart Phones nach\nAnschlusstyp gruppiert."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"klausurvorbereitung-java-i",children:"Klausurvorbereitung Java I"}),"\n",(0,r.jsx)(n.h3,{id:"08032023",children:"08.03.2023"}),"\n",(0,r.jsx)(n.p,{children:"** Aufgaben in der Probeklausur 2202_Q4 **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Aufgabe 1-a f\xfcr die Methode a"}),"\n",(0,r.jsx)(n.li,{children:"Aufgabe 1-b"}),"\n",(0,r.jsx)(n.li,{children:"Aufgabe 2"}),"\n",(0,r.jsx)(n.li,{children:"Aufgabe 5"}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"14032023",children:"14.03.2023"}),"\n",(0,r.jsx)(n.h4,{id:"aufgabe-array",children:"Aufgabe Array"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n class ExamTask {\n +main(args: String[])$ void\n +split(numbers: int[], index: int)$ void\n }"}),"\n",(0,r.jsxs)(n.p,{children:["** Hinweise zur Methode split ** ",(0,r.jsx)("br",{})," Die Methode split soll ein Array vom Typ\nint so verarbeiten, dass ein neues Array erstellt wird, was alle Elemente des\neingehenden Arrays bis zum angegebenen Index enth\xe4lt. Das neu erstellte Array\nsoll anschlie\xdfend zur\xfcckgegeben werden. Verwende keine ArrayList! Bsp.: Der\nParameter numbers enth\xe4lt die Elemente 10, 8, 3, 22 & 1 der Parameter index ist\ngleich 2. Zur\xfcckgegeben werden soll ein neues Array, das die Elemente 10, 8 & 3\nenth\xe4lt."]}),"\n",(0,r.jsxs)(n.p,{children:["** Hinweise zur Methode main ** ",(0,r.jsx)("br",{})," In der Methode main soll ein Arrays\nerstellt werden, dass die Ganzzahlen 10, 8, 3, 22 & 1 enth\xe4lt. Erstelle mithilfe\nder Methode split ein neues Array, dass die ersten drei Elemente des ersten\nArrays enthalten soll. Gib mithilfe einer For-Schleife alle Elemente des neu\nerstellten Arrays aus."]}),"\n",(0,r.jsx)(n.h4,{id:"aufgabe-exception",children:"Aufgabe Exception"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n direction LR\n\n Barrel -- OverflowException\n\n class Barrel {\n -capacity int\n -fluidLevel int\n +Barrel(capacity: int)\n +addFluid(value: int) void\n }\n\n class OverflowException {\n <>\n -higherThanCapacity int { final }\n +OverflowException(higherThanCapacity: int)\n +getHigherThanCapacity() int\n }"}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse OverflowException **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren."}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"getHigherThanCapacity"})," soll die zu viel hinzugef\xfcgte\nFl\xfcssigkeit zur\xfcckgeben."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse Barrel**"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren. Das Fass ist Anfangs immer\nleer."}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"addFluid"})," soll die OverflowException ausl\xf6sen, wenn die Summe\nder eingehenden Fl\xfcssigkeit und der im Fass befindenden Fl\xfcssigkeit die\nKapazit\xe4t \xfcberschreitet. \xdcbergebe der Ausnahme den Wert, um wieviel die\nmaximale Kapazit\xe4t \xfcberschritten wurde. Wenn die maximale Kapazit\xe4t nicht\n\xfcberschritten wird, soll die eingehende Fl\xfcssigkeit dem Fass hinzugef\xfcgt\nwerden"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["** Zusatz in ausf\xfchrbarer Klasse ** ",(0,r.jsx)("br",{})," Erstelle ein neues Fass, das die\nmaximale Kapazit\xe4t von 100 hat. Versuche anschlie\xdfend das Fass auf 101 zu f\xfcllen\nund fange die Ausnahme ab. Gib in der Konsole aus, um wieviel die maximale\nKapazit\xe4t \xfcberschritten wurde.",(0,r.jsx)("br",{})," ** Beispiel Konsolenausgabe: ** ",(0,r.jsx)("br",{}),' "Es\nw\xe4re um 1 zu viel bef\xfcllt worden."']}),"\n",(0,r.jsx)(n.h3,{id:"21032023",children:"21.03.2023"}),"\n",(0,r.jsx)(n.h4,{id:"aufgabe-abstrakte-klasse-enum",children:"Aufgabe abstrakte Klasse, Enum"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n\n EnergySource --o Phone\n CablePhone --\x3e Phone\n SmartPhone --\x3e Phone\n\n class EnergySource {\n <>\n BATTERY('B')\n POWER_PLUG('P')\n -type char\n EnergySource(type: char)\n +getType() char\n +canBeUsedEverywhere() boolean\n }\n\n class Phone {\n <>\n #energySource EnergySource { final }\n +Phone(energySource: EnergySource)\n +readyForUse()* boolean\n }\n\n class CablePhone {\n -pluggedIn boolean\n -poweredOn boolean\n +CablePhone(energySource: EnergySource, pluggedIn: boolean, poweredOn: boolean)\n +readyForUse(): boolean\n }\n\n class SmartPhone {\n -MINIMUM_POWER int$\n -power int\n +SmartPhone(energySource: EnergySource, power: int)\n +readyForUse(): boolean\n }\n\n class ExamTask04 {\n +main(args: String[])$ void\n }"}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse EnergySource **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Erstelle die zwei Konstanten Batterie und Steckdose f\xfcr die Arten einer\nEnergiequelle."}),"\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren."}),"\n",(0,r.jsx)(n.li,{children:"Die Methode getType soll den Typ der Energiequelle zur\xfcckgeben."}),"\n",(0,r.jsx)(n.li,{children:"Die Methode canBeUsedEverywhere soll true zur\xfcckgeben, wenn die Energiequelle\neine Batterie ist."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse Phone **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse CablePhone **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren."}),"\n",(0,r.jsx)(n.li,{children:"Die Methode readyForUse soll true zur\xfcckgeben, wenn das Kabeltelefon\neingesteckt und eingeschalten ist."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse SmartPhone **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Die minimale Energie soll 200 betragen."}),"\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren."}),"\n",(0,r.jsx)(n.li,{children:"Die Methode readyForUse soll true zur\xfcckgeben, wenn die Energie des\nSmartphones die minimal erforderliche Energie \xfcberschreitet."}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["** Hinweise zur Klasse ExamTask04 ** ",(0,r.jsx)("br",{})," Erzeuge ein Kabeltelefon mit Akku und\neines, dass an die Steckdose angeschlossen ist. Erzeuge ein leeres Smartphone\nund eines das halb voll ist. Speichere alle erzeugten Fahrzeuge in einer\nArrayList. Ermittle mithilfe einer Schleife die Anzahl der betriebsbereiten\nTelefone. Gib die Anzahl in der Konsole aus."]}),"\n",(0,r.jsx)(n.h4,{id:"aufgabe-comparator",children:"Aufgabe Comparator"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n direction LR\n\n Comparator~Car~ <.. ConstructionYearComparator\n CarVendor -- ConstructionYearComparator\n CarVendor o-- Car\n\n class Comparator~Car~ {\n <>\n +compare(c1: Car, c2: Car) int\n }\n\n class ConstructionYearComparator {\n +compare(c1: Car, c2: Car) int\n }\n\n class CarVendor {\n -cars ArrayList~Car~\n +CarVendor()\n +sortByConstructionYear() void\n +print() void\n }\n\n class Car {\n <>\n +getConstructionYear() int\n }"}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse CarVendor **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren."}),"\n",(0,r.jsx)(n.li,{children:"Die Methode sortByConstructionYear soll die Autos absteigend nach Baujahr\nsortieren."}),"\n",(0,r.jsx)(n.li,{children:"Die Methode print soll das Baujahr aller Autos in der Konsole ausgeben."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse ConstructionYearComparator **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Der ConstructionYearComparator soll das Comparator Interface implementieren\nund Autos absteigend nach Baujahr sortieren."}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,a.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},37226:(e,n,i)=>{i.d(n,{Z:()=>r});const r=i.p+"assets/files/java-cheat-sheet-1564904cc291264239f91a360bcde2f8.pdf"},11151:(e,n,i)=>{i.d(n,{Z:()=>t,a:()=>l});var r=i(67294);const a={},s=r.createContext(a);function l(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:l(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[3083],{75265:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>u,frontMatter:()=>s,metadata:()=>t,toc:()=>o});var r=i(85893),a=i(11151);const s={title:"Steffen",description:"",sidebar_position:30,tags:[]},l=void 0,t={id:"additional-material/steffen",title:"Steffen",description:"",source:"@site/docs/additional-material/steffen.md",sourceDirName:"additional-material",slug:"/additional-material/steffen",permalink:"/java-docs/pr-preview/pr-75/additional-material/steffen",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/additional-material/steffen.md",tags:[],version:"current",sidebarPosition:30,frontMatter:{title:"Steffen",description:"",sidebar_position:30,tags:[]},sidebar:"additionalMaterialSidebar",previous:{title:"Klausurergebnisse",permalink:"/java-docs/pr-preview/pr-75/additional-material/daniel-java2/exam-results"}},d={},o=[{value:"Java I",id:"java-i",level:2},{value:"Java II",id:"java-ii",level:2},{value:"Demos",id:"demos",level:2},{value:"Klausurvorbereitung Java II",id:"klausurvorbereitung-java-ii",level:2},{value:"Aufgabe Optionals",id:"aufgabe-optionals",level:2},{value:"Klassendiagramm",id:"klassendiagramm",level:3},{value:"Aufgabe Lambdafunktionen",id:"aufgabe-lambdafunktionen",level:2},{value:"Klassendiagramm",id:"klassendiagramm-1",level:3},{value:"Aufgabe Streams",id:"aufgabe-streams",level:2},{value:"Klassendiagramm",id:"klassendiagramm-2",level:3},{value:"Hinweise zur Klasse PhoneStore",id:"hinweise-zur-klasse-phonestore",level:2},{value:"Klausurvorbereitung Java I",id:"klausurvorbereitung-java-i",level:2},{value:"08.03.2023",id:"08032023",level:3},{value:"14.03.2023",id:"14032023",level:3},{value:"Aufgabe Array",id:"aufgabe-array",level:4},{value:"Aufgabe Exception",id:"aufgabe-exception",level:4},{value:"21.03.2023",id:"21032023",level:3},{value:"Aufgabe abstrakte Klasse, Enum",id:"aufgabe-abstrakte-klasse-enum",level:4},{value:"Aufgabe Comparator",id:"aufgabe-comparator",level:4}];function c(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",mermaid:"mermaid",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"java-i",children:"Java I"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/intro",children:"Einleitung"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/datatypes-and-dataobjects",children:"Datentypen und Datenobjekte"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/methods-and-operators",children:"Methoden und Operatoren"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/if-and-switch",children:"Kontrollstrukturen und Arrays"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/math-random-scanner",children:"Math, Random und Scanner"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/classes-and-objects",children:"Klassen und Objekte"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/constructor-and-static",children:"Konstruktor und static"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/class-diagram-java-api-enum",children:"Java API, Enum, Klassendiagramm, Aktivit\xe4tsdiagramm"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/Inheritance",children:"Vererbung"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/polymorphy",children:"Polymorphie"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/abstract-and-final",children:"Abstrakte und finale Klassen"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/interfaces",children:"Interfaces"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/exceptions",children:"Exceptions"})}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"java-ii",children:"Java II"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/recap",children:"Wiederholung und Klausurbesprechung 10.08.23"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/lambda",children:"Innere Klassen und Lambda Funktionen 17.08.23"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/records-optionals",children:"Records und Optionals 18.08.23"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/generics-maps",children:"Generics und Maps 24.08.23"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/slides/steffen/stream-api",children:"Stream API 31.08.23 & 01.09.23"})}),"\n",(0,r.jsx)(n.li,{children:"Probeklausur 07.09.23"}),"\n",(0,r.jsx)(n.li,{children:"Probeklausur 14.09.23"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"demos",children:"Demos"}),"\n",(0,r.jsx)(n.p,{children:"Die Endergebnisse der Demos findet ihr in folgendem Branch:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"git switch demos/steffen\n"})}),"\n",(0,r.jsx)(n.h2,{id:"klausurvorbereitung-java-ii",children:"Klausurvorbereitung Java II"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.a,{target:"_blank",href:i(37226).Z+"",children:"Cheatsheet Java II"})}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:"Altklausuren 2022 Q3 - Klausur Java 2 Aufgabe 3"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'public class PlanetQueries {\n\n public static ArrayList planets = Planet.getPlantes();\n\n public static void a() {\n PlanetQueries.planets.stream()\n .filter(p -> p.moons() > 5)\n .forEach(p -> {\n System.out.println(p.name() + ": " + p.moons());\n });\n }\n\n public static OptionalDouble b() {\n return PlanetQueries.planets.stream()\n .filter(p -> p.type() == Type.GAS_PLANET)\n .mapToDouble(p -> p.diameter())\n .average();\n }\n\n public static List c() {\n return PlanetQueries.planets.stream()\n .sorted((p1, p2) -> Double.compare(p2.mass(), p1.mass()))\n .toList();\n }\n\n public static boolean d() {\n return PlanetQueries.planets.stream()\n .allMatch(p -> p.moons() > 0);\n }\n\n public static void e() {\n Map> planetsMap = PlanetQueries.planets.stream()\n .collect(Collectors.groupingBy(p -> p.type()));\n planetsMap.entrySet()\n .stream()\n .forEach(entry -> {\n System.out.println(entry.getKey() + ":" + entry.getValue());\n });\n }\n}\n'})}),"\n",(0,r.jsxs)(n.ol,{start:"2",children:["\n",(0,r.jsx)(n.li,{children:"Altklausuren 2022 Q3 - Probeklausur Java 2 Klausur Aufgabe 3"}),"\n",(0,r.jsx)(n.li,{children:"Altklausuren 2023 Q1 - Wiederholklausur 2 Java 2 Klausur Aufgabe 3"}),"\n",(0,r.jsx)(n.li,{children:"Altklausuren 2023 Q1 - Wiederholklausur Java 2 Klausur Aufgabe 3"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"aufgabe-optionals",children:"Aufgabe Optionals"}),"\n",(0,r.jsx)(n.h3,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n class Car {\n +name String\n +brand String\n +addition Optional~String~\n +Car(name String, brand String)\n +Car(name String, brand String, addition String)\n +toString() String\n }"}),"\n",(0,r.jsxs)(n.p,{children:["** Hinweise zu den Konstruktoren** ",(0,r.jsx)("br",{})," Die Konstruktoren sollen alle Attribute\ninitialisieren."]}),"\n",(0,r.jsxs)(n.p,{children:["** Hinweise zur Methode toString ** ",(0,r.jsx)("br",{})," Die Methode toString soll die\nAttribute brand, model und addition zur\xfcckgeben. Die Attribute sollen durch eine\nLeertaste getrennt sein. Falls addition keinen Wert besitz, soll dieser\nignoriert werden."]}),"\n",(0,r.jsx)(n.p,{children:'Erstelle eine ausf\xfchrbare Klasse in der ein Auto mit der Marke "Mercedes", dem\nModell "CLA45" und dem Zusatz "AMG" initialisiert wird. Gib das Auto in der\nKonsole aus. Entferne den Zusatz von dem Auto und gebe das Auto erneut in der\nKonsole aus.'}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'public class Car {\n public String name;\n public String brand;\n public Optional addition;\n\n public Car(String name, String brand) {\n this.name = name;\n this.brand = brand;\n this.addition = Optional.empty();\n }\n\n public Car(String name, String brand, String addition) {\n this.name = name;\n this.brand = brand;\n this.addition = Optional.ofNullable(addition);\n }\n\n public String toString() {\n if (addition.isPresent()) {\n return brand + " " + name + addition.get();\n } else {\n return brand + " " + name;\n }\n }\n}\n'})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'public class Main {\n public static void main(String[] args) {\n Car benz = new Car("CLA45", "Mercedes", "AMG");\n System.out.println(benz.toString());\n benz.addition = Optional.empty();\n System.out.println(benz.toString());\n }\n}\n'})}),"\n",(0,r.jsx)(n.h2,{id:"aufgabe-lambdafunktionen",children:"Aufgabe Lambdafunktionen"}),"\n",(0,r.jsx)(n.h3,{id:"klassendiagramm-1",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n Helper -- Animal\n Data -- Animal\n Task2 -- Animal\n Task2 -- Data\n Task2 -- Helper\n\n class Helper {\n +isNewBorn UNKNOWN$\n +toOutput UNKNOWN$\n +isHigherThan(size: int)$ Predicate~Student~\n }\n\n class Animal {\n <>\n +firstName String\n +lastName String\n +size int\n }\n\n class Data {\n +getAnimals()$ Stream~Animal~\n }\n\n class Task2 {\n +main(args: String[])$ void\n }"}),"\n",(0,r.jsxs)(n.p,{children:["** Hinweise zur Klasse Helper** ",(0,r.jsx)("br",{})," Im Klassendiagramm sind keine\nR\xfcckgabetypen f\xfcr die statischen Attribute angegeben. Gib f\xfcr jedes Attribut den\ngeeigneten Typ an."]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Das Attribut ",(0,r.jsx)(n.strong,{children:"isNewBorn"})," soll eine Lambdafunktion enthalten die ermittelt,\nob ein Tier j\xfcnger als 1 Jahr alt ist."]}),"\n",(0,r.jsxs)(n.li,{children:["Das Attribut ",(0,r.jsx)(n.strong,{children:"toOutput"}),' soll eine Lambdafunktion enthalten, die ein Tier in\nfolgenden String konvertiert: "firstName lastName ist size Zentimeter gro\xdf."']}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"isHigherThan"})," soll eine Lambdafunktion zur\xfcckgeben, die\nabh\xe4ngig vom Parameter size \xfcberpr\xfcft, ob ein Tier gr\xf6\xdfer als die angegebene\nGr\xf6\xdfe ist."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Hinweise zur Klasse Data"})," ",(0,r.jsx)("br",{})]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"getAnimals"})," soll einen Stream von einem einzelnen Tier mit den\nWerten deiner Wahl zur\xfcckgeben."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Hinweise zur Klasse Task2"})," ",(0,r.jsx)("br",{})," Verwende f\xfcr die nachfolgende Abfolge die\nMethoden der Klassen Data und Helper. Erzeuge einen Stream von Tieren und\nfiltere jene heraus, die Gr\xf6\xdfer als 50 Zentimeter sind. Gib anschlie\xdfend den\nvollen Namen und die Gr\xf6\xdfe der Tiere in der Konsole aus."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"public record Animal(String firstName, String lastName, int age, int size) {}\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'public class Data {\n public static Stream getAnimals() {\n return Stream.of(new Animal("Steffen", "Merk", 28, 170));\n }\n}\n'})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'public class Helper {\n public static Predicate isNewBorn = animal -> animal.age() < 1;\n public static Function toOutput = animal -> animal.firstName()\n + " " + animal.lastName() + " ist " + animal.size() + " Zentimeter gro\xdf";\n\n public static Predicate isHigherThan(int size) {\n return animal -> animal.size() > size;\n }\n}\n'})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"public class Task2 {\n public static void main(String[] args) {\n Data.getAnimals()\n .filter(Helper.isHigherThan(50))\n .map(Helper.toOutput)\n .forEach(System.out::println);\n }\n}\n"})}),"\n",(0,r.jsx)(n.h2,{id:"aufgabe-streams",children:"Aufgabe Streams"}),"\n",(0,r.jsx)(n.h3,{id:"klassendiagramm-2",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n direction LR\n\n ConnectionType -- Phone\n Phone -- Data\n Phone -- Brand\n Phone -- PhoneStore\n\n class ConnectionType {\n <>\n TYPC\n THUNDERBOLT\n MICRO\n +isModern() boolean\n }\n\n class Phone {\n <>\n +brand Brand\n +connectionType ConnectionType\n +cameras int\n +batterySize int\n +cpuPower int\n +price double\n }\n\n class Data {\n +gePhones()$ ArrayList~Phone~\n }\n\n class Brand {\n <>\n APPLE\n SAMSUNG\n HUAWEI\n }\n\n class PhoneStore {\n -phones ArrayList~Phone~\n +PhoneStore(phones: ArrayList~Phone~)\n +q1() Phone~Car~\n +q2() OptionalDouble\n +q3(maxPrice: double) List~Phone~\n +q4() Map~String‚ Phone~\n +q5() Map~String‚ List~Phone~~\n }"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"public class PhoneStore {\n private ArrayList phones;\n\n public PhoneStore(ArrayList phones) {\n this.phones = phones;\n }\n\n public List q1() {\n return phones.stream()\n .filter(p -> p.brand() == Brand.HUAWEI)\n .filter(p -> p.cameras() > 3)\n .sorted((p1, p2) -> Integer.compare(p2.cpuPower(), p1.cpuPower()))\n .limit(3)\n .sorted((p1, p2) -> Double.compare(p2.price(), p1.price()))\n .toList();\n }\n\n public OptionalDouble q2() {\n return phones.stream()\n .filter(p -> p.batterySize() > 2500)\n .mapToInt(p -> p.cameras())\n .average();\n }\n\n public List q3(double maxPrice) {\n return phones.stream()\n .filter(p -> p.price() <= maxPrice)\n .filter(p -> p.connectionType().isModern())\n .filter(p -> p.cpuPower() < 2400)\n .sorted((p1, p2) -> Double.compare(p1.price(), p2.price()))\n .toList();\n }\n\n public Map q4() {\n return phones.stream()\n .collect(Collectors.toMap(\n p -> p.brand().name() + p.connectionType().name(),\n p -> p));\n }\n\n public Map> q5() {\n return phones.stream()\n .collect(Collectors.groupingBy(p -> p.connectionType()));\n }\n\n}\n"})}),"\n",(0,r.jsx)(n.h2,{id:"hinweise-zur-klasse-phonestore",children:"Hinweise zur Klasse PhoneStore"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren."}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"q1"})," soll die drei Leistungsst\xe4rksten (CPU Power) Smart Phones\nder Marke Huawei, absteigend nach dem Preis zur\xfcckgeben, welche mehr als 3\nKameras haben."]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"q2"})," soll die durchschnittliche Kameraanzahl aller Smart Phones\nzur\xfcckgeben, die einen Akku von 2500 oder mehr haben."]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"q3"})," soll die Smart Phones aufsteigend nach Preis zur\xfcckgeben,\ndie den ",(0,r.jsx)(n.strong,{children:"maxPrice"})," nicht \xfcberschreiten, einen modernen Anschlusstyp haben\nund weniger als 2400 Leistung (CPU Power) haben."]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"q4"})," soll eine Map zur\xfcckgeben. Der Schl\xfcssel soll aus dem\nMarkennamen und dem Anschlusstyp zusammengesetzt werden. Als Wert soll das\nAuto zur\xfcckgegeben werden."]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"q5"})," soll eine Map zur\xfcckgeben, welche alle Smart Phones nach\nAnschlusstyp gruppiert."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"klausurvorbereitung-java-i",children:"Klausurvorbereitung Java I"}),"\n",(0,r.jsx)(n.h3,{id:"08032023",children:"08.03.2023"}),"\n",(0,r.jsx)(n.p,{children:"** Aufgaben in der Probeklausur 2202_Q4 **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Aufgabe 1-a f\xfcr die Methode a"}),"\n",(0,r.jsx)(n.li,{children:"Aufgabe 1-b"}),"\n",(0,r.jsx)(n.li,{children:"Aufgabe 2"}),"\n",(0,r.jsx)(n.li,{children:"Aufgabe 5"}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"14032023",children:"14.03.2023"}),"\n",(0,r.jsx)(n.h4,{id:"aufgabe-array",children:"Aufgabe Array"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n class ExamTask {\n +main(args: String[])$ void\n +split(numbers: int[], index: int)$ void\n }"}),"\n",(0,r.jsxs)(n.p,{children:["** Hinweise zur Methode split ** ",(0,r.jsx)("br",{})," Die Methode split soll ein Array vom Typ\nint so verarbeiten, dass ein neues Array erstellt wird, was alle Elemente des\neingehenden Arrays bis zum angegebenen Index enth\xe4lt. Das neu erstellte Array\nsoll anschlie\xdfend zur\xfcckgegeben werden. Verwende keine ArrayList! Bsp.: Der\nParameter numbers enth\xe4lt die Elemente 10, 8, 3, 22 & 1 der Parameter index ist\ngleich 2. Zur\xfcckgegeben werden soll ein neues Array, das die Elemente 10, 8 & 3\nenth\xe4lt."]}),"\n",(0,r.jsxs)(n.p,{children:["** Hinweise zur Methode main ** ",(0,r.jsx)("br",{})," In der Methode main soll ein Arrays\nerstellt werden, dass die Ganzzahlen 10, 8, 3, 22 & 1 enth\xe4lt. Erstelle mithilfe\nder Methode split ein neues Array, dass die ersten drei Elemente des ersten\nArrays enthalten soll. Gib mithilfe einer For-Schleife alle Elemente des neu\nerstellten Arrays aus."]}),"\n",(0,r.jsx)(n.h4,{id:"aufgabe-exception",children:"Aufgabe Exception"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n direction LR\n\n Barrel -- OverflowException\n\n class Barrel {\n -capacity int\n -fluidLevel int\n +Barrel(capacity: int)\n +addFluid(value: int) void\n }\n\n class OverflowException {\n <>\n -higherThanCapacity int { final }\n +OverflowException(higherThanCapacity: int)\n +getHigherThanCapacity() int\n }"}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse OverflowException **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren."}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"getHigherThanCapacity"})," soll die zu viel hinzugef\xfcgte\nFl\xfcssigkeit zur\xfcckgeben."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse Barrel**"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren. Das Fass ist Anfangs immer\nleer."}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.strong,{children:"addFluid"})," soll die OverflowException ausl\xf6sen, wenn die Summe\nder eingehenden Fl\xfcssigkeit und der im Fass befindenden Fl\xfcssigkeit die\nKapazit\xe4t \xfcberschreitet. \xdcbergebe der Ausnahme den Wert, um wieviel die\nmaximale Kapazit\xe4t \xfcberschritten wurde. Wenn die maximale Kapazit\xe4t nicht\n\xfcberschritten wird, soll die eingehende Fl\xfcssigkeit dem Fass hinzugef\xfcgt\nwerden"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["** Zusatz in ausf\xfchrbarer Klasse ** ",(0,r.jsx)("br",{})," Erstelle ein neues Fass, das die\nmaximale Kapazit\xe4t von 100 hat. Versuche anschlie\xdfend das Fass auf 101 zu f\xfcllen\nund fange die Ausnahme ab. Gib in der Konsole aus, um wieviel die maximale\nKapazit\xe4t \xfcberschritten wurde.",(0,r.jsx)("br",{})," ** Beispiel Konsolenausgabe: ** ",(0,r.jsx)("br",{}),' "Es\nw\xe4re um 1 zu viel bef\xfcllt worden."']}),"\n",(0,r.jsx)(n.h3,{id:"21032023",children:"21.03.2023"}),"\n",(0,r.jsx)(n.h4,{id:"aufgabe-abstrakte-klasse-enum",children:"Aufgabe abstrakte Klasse, Enum"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n\n EnergySource --o Phone\n CablePhone --\x3e Phone\n SmartPhone --\x3e Phone\n\n class EnergySource {\n <>\n BATTERY('B')\n POWER_PLUG('P')\n -type char\n EnergySource(type: char)\n +getType() char\n +canBeUsedEverywhere() boolean\n }\n\n class Phone {\n <>\n #energySource EnergySource { final }\n +Phone(energySource: EnergySource)\n +readyForUse()* boolean\n }\n\n class CablePhone {\n -pluggedIn boolean\n -poweredOn boolean\n +CablePhone(energySource: EnergySource, pluggedIn: boolean, poweredOn: boolean)\n +readyForUse(): boolean\n }\n\n class SmartPhone {\n -MINIMUM_POWER int$\n -power int\n +SmartPhone(energySource: EnergySource, power: int)\n +readyForUse(): boolean\n }\n\n class ExamTask04 {\n +main(args: String[])$ void\n }"}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse EnergySource **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Erstelle die zwei Konstanten Batterie und Steckdose f\xfcr die Arten einer\nEnergiequelle."}),"\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren."}),"\n",(0,r.jsx)(n.li,{children:"Die Methode getType soll den Typ der Energiequelle zur\xfcckgeben."}),"\n",(0,r.jsx)(n.li,{children:"Die Methode canBeUsedEverywhere soll true zur\xfcckgeben, wenn die Energiequelle\neine Batterie ist."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse Phone **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse CablePhone **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren."}),"\n",(0,r.jsx)(n.li,{children:"Die Methode readyForUse soll true zur\xfcckgeben, wenn das Kabeltelefon\neingesteckt und eingeschalten ist."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse SmartPhone **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Die minimale Energie soll 200 betragen."}),"\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren."}),"\n",(0,r.jsx)(n.li,{children:"Die Methode readyForUse soll true zur\xfcckgeben, wenn die Energie des\nSmartphones die minimal erforderliche Energie \xfcberschreitet."}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["** Hinweise zur Klasse ExamTask04 ** ",(0,r.jsx)("br",{})," Erzeuge ein Kabeltelefon mit Akku und\neines, dass an die Steckdose angeschlossen ist. Erzeuge ein leeres Smartphone\nund eines das halb voll ist. Speichere alle erzeugten Fahrzeuge in einer\nArrayList. Ermittle mithilfe einer Schleife die Anzahl der betriebsbereiten\nTelefone. Gib die Anzahl in der Konsole aus."]}),"\n",(0,r.jsx)(n.h4,{id:"aufgabe-comparator",children:"Aufgabe Comparator"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n direction LR\n\n Comparator~Car~ <.. ConstructionYearComparator\n CarVendor -- ConstructionYearComparator\n CarVendor o-- Car\n\n class Comparator~Car~ {\n <>\n +compare(c1: Car, c2: Car) int\n }\n\n class ConstructionYearComparator {\n +compare(c1: Car, c2: Car) int\n }\n\n class CarVendor {\n -cars ArrayList~Car~\n +CarVendor()\n +sortByConstructionYear() void\n +print() void\n }\n\n class Car {\n <>\n +getConstructionYear() int\n }"}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse CarVendor **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Der Konstruktor soll alle Attribute initialisieren."}),"\n",(0,r.jsx)(n.li,{children:"Die Methode sortByConstructionYear soll die Autos absteigend nach Baujahr\nsortieren."}),"\n",(0,r.jsx)(n.li,{children:"Die Methode print soll das Baujahr aller Autos in der Konsole ausgeben."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"** Hinweise zur Klasse ConstructionYearComparator **"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Der ConstructionYearComparator soll das Comparator Interface implementieren\nund Autos absteigend nach Baujahr sortieren."}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,a.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},37226:(e,n,i)=>{i.d(n,{Z:()=>r});const r=i.p+"assets/files/java-cheat-sheet-1564904cc291264239f91a360bcde2f8.pdf"},11151:(e,n,i)=>{i.d(n,{Z:()=>t,a:()=>l});var r=i(67294);const a={},s=r.createContext(a);function l(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:l(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/859318dd.a7914752.js b/pr-preview/pr-75/assets/js/859318dd.a7914752.js
deleted file mode 100644
index 027e186729..0000000000
--- a/pr-preview/pr-75/assets/js/859318dd.a7914752.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[6244],{60570:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>i,default:()=>h,frontMatter:()=>l,metadata:()=>o,toc:()=>c});var r=t(85893),s=t(11151),a=t(85521);const l={title:"Maps02",description:""},i=void 0,o={id:"exercises/maps/maps02",title:"Maps02",description:"",source:"@site/docs/exercises/maps/maps02.mdx",sourceDirName:"exercises/maps",slug:"/exercises/maps/maps02",permalink:"/java-docs/pr-preview/pr-75/exercises/maps/maps02",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exercises/maps/maps02.mdx",tags:[],version:"current",frontMatter:{title:"Maps02",description:""},sidebar:"exercisesSidebar",previous:{title:"Maps01",permalink:"/java-docs/pr-preview/pr-75/exercises/maps/maps01"},next:{title:"Optionals",permalink:"/java-docs/pr-preview/pr-75/exercises/optionals/"}},u={},c=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Hinweise zur Klasse BookCollection",id:"hinweise-zur-klasse-bookcollection",level:2}];function d(e){const n={code:"code",h2:"h2",li:"li",mermaid:"mermaid",ul:"ul",...(0,s.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Erstelle die Klassen ",(0,r.jsx)(n.code,{children:"Author"}),", ",(0,r.jsx)(n.code,{children:"Book"}),", ",(0,r.jsx)(n.code,{children:"BookCollection"})," und\n",(0,r.jsx)(n.code,{children:"DuplicateKeyException"})," anhand des abgebildeten Klassendiagramms"]}),"\n",(0,r.jsx)(n.li,{children:"Erstelle eine ausf\xfchrbare Klasse, welche eine B\xfcchersammlung mit mehreren\nAutoren und B\xfcchern erzeugt und den flei\xdfigsten Autoren auf der Konsole\nausgibt"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n BookCollection o-- Author\n BookCollection o-- Book\n\n class Author {\n <>\n -name String\n }\n\n class Book {\n <>\n -title String\n }\n\n class BookCollection {\n <>\n -collection Map~Author, List~Book~~\n +addAuthor(author Author) void\n +addBook(author Author, book Book) void\n +getMostDiligentAuthor() Author\n +getBookByTitle(title String) Book\n }"}),"\n",(0,r.jsx)(n.h2,{id:"hinweise-zur-klasse-bookcollection",children:"Hinweise zur Klasse BookCollection"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void addAuthor(author: Author)"})," soll den eingehenden Autor der\nB\xfcchersammlung hinzuf\xfcgen. F\xfcr den Fall, dass der Autor bereits in der\nB\xfcchersammlung vorhanden ist, soll die Ausnahme ",(0,r.jsx)(n.code,{children:"DuplicateKeyException"}),"\nausgel\xf6st werden"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void addBook(author: Author, book: Book)"})," soll das eingehende\nBuch der B\xfcchersammlung hinzuf\xfcgen"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"Author getMostDiligentAuthor()"})," soll den Autoren mit den meisten\nB\xfcchern in der B\xfcchersammlung zur\xfcckgeben"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"Book getBookByTitle(title: String)"})," soll das Buch zum eingehenden\nBuchtitel zur\xfcckgeben"]}),"\n"]}),"\n",(0,r.jsx)(a.Z,{pullRequest:"66",branchSuffix:"maps/02"})]})}function h(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},85162:(e,n,t)=>{t.d(n,{Z:()=>l});t(67294);var r=t(34334);const s={tabItem:"tabItem_Ymn6"};var a=t(85893);function l(e){let{children:n,hidden:t,className:l}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,r.Z)(s.tabItem,l),hidden:t,children:n})}},74866:(e,n,t)=>{t.d(n,{Z:()=>w});var r=t(67294),s=t(34334),a=t(12466),l=t(16550),i=t(20469),o=t(91980),u=t(67392),c=t(50012);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:s}}=e;return{value:n,label:t,attributes:r,default:s}}))}(t);return function(e){const n=(0,u.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:t}=e;const s=(0,l.k6)(),a=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,o._X)(a),(0,r.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(s.location.search);n.set(a,e),s.replace({...s.location,search:n.toString()})}),[a,s])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,a=h(e),[l,o]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:a}))),[u,d]=m({queryString:t,groupId:s}),[b,g]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,a]=(0,c.Nk)(t);return[s,(0,r.useCallback)((e=>{t&&a.set(e)}),[t,a])]}({groupId:s}),f=(()=>{const e=u??b;return p({value:e,tabValues:a})?e:null})();(0,i.Z)((()=>{f&&o(f)}),[f]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);o(e),d(e),g(e)}),[d,g,a]),tabValues:a}}var g=t(72389);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(85893);function x(e){let{className:n,block:t,selectedValue:r,selectValue:l,tabValues:i}=e;const o=[],{blockElementScrollPositionUntilNextRender:u}=(0,a.o5)(),c=e=>{const n=e.currentTarget,t=o.indexOf(n),s=i[t].value;s!==r&&(u(n),l(s))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const t=o.indexOf(e.currentTarget)+1;n=o[t]??o[0];break}case"ArrowLeft":{const t=o.indexOf(e.currentTarget)-1;n=o[t]??o[o.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.Z)("tabs",{"tabs--block":t},n),children:i.map((e=>{let{value:n,label:t,attributes:a}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>o.push(e),onKeyDown:d,onClick:c,...a,className:(0,s.Z)("tabs__item",f.tabItem,a?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function j(e){let{lazy:n,children:t,selectedValue:s}=e;const a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=a.find((e=>e.props.value===s));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:a.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function k(e){const n=b(e);return(0,v.jsxs)("div",{className:(0,s.Z)("tabs-container",f.tabList),children:[(0,v.jsx)(x,{...e,...n}),(0,v.jsx)(j,{...e,...n})]})}function w(e){const n=(0,g.Z)();return(0,v.jsx)(k,{...e,children:d(e.children)},String(n))}},85521:(e,n,t)=>{t.d(n,{Z:()=>o});t(67294);var r=t(74866),s=t(85162),a=t(39960),l=t(9286),i=t(85893);function o(e){let{pullRequest:n,branchSuffix:t}=e;return(0,i.jsxs)(r.Z,{children:[(0,i.jsxs)(s.Z,{value:"exercise",label:"Exercise",default:!0,children:[(0,i.jsx)(l.Z,{language:"console",children:`git switch exercises/${t}`}),(0,i.jsx)(a.Z,{to:`https://gitpod.io/#https://github.com/jappuccini/java-exercises/blob/exercises/${t}/Exercise.java`,children:(0,i.jsx)("img",{alt:"Open in Gitpod",src:"https://gitpod.io/button/open-in-gitpod.svg"})})]}),(0,i.jsxs)(s.Z,{value:"solution",label:"Solution",children:[(0,i.jsx)(l.Z,{language:"console",children:`git switch solutions/${t}`}),(0,i.jsx)(a.Z,{to:`https://gitpod.io/#https://github.com/jappuccini/java-exercises/blob/solutions/${t}/Exercise.java`,children:(0,i.jsx)("img",{alt:"Open in Gitpod",src:"https://gitpod.io/button/open-in-gitpod.svg"})})]}),(0,i.jsxs)(s.Z,{value:"pullrequest",label:"Pull Request",children:["Alle \xa0\xc4nderungen zwischen der Aufgabe und der L\xf6sung findest du im Pull Request"," ",(0,i.jsxs)(a.Z,{to:`https://github.com/jappuccini/java-exercises/pull/${n}/files?diff=split`,children:["PR#",n]})]})]})}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/859318dd.f3d902c1.js b/pr-preview/pr-75/assets/js/859318dd.f3d902c1.js
new file mode 100644
index 0000000000..d821fd86a8
--- /dev/null
+++ b/pr-preview/pr-75/assets/js/859318dd.f3d902c1.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[6244],{60570:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>o,default:()=>h,frontMatter:()=>l,metadata:()=>i,toc:()=>c});var r=t(85893),s=t(11151),a=t(85521);const l={title:"Maps02",description:""},o=void 0,i={id:"exercises/maps/maps02",title:"Maps02",description:"",source:"@site/docs/exercises/maps/maps02.mdx",sourceDirName:"exercises/maps",slug:"/exercises/maps/maps02",permalink:"/java-docs/pr-preview/pr-75/exercises/maps/maps02",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exercises/maps/maps02.mdx",tags:[],version:"current",frontMatter:{title:"Maps02",description:""},sidebar:"exercisesSidebar",previous:{title:"Maps01",permalink:"/java-docs/pr-preview/pr-75/exercises/maps/maps01"},next:{title:"Optionals",permalink:"/java-docs/pr-preview/pr-75/exercises/optionals/"}},u={},c=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Hinweise zur Klasse BookCollection",id:"hinweise-zur-klasse-bookcollection",level:2}];function d(e){const n={code:"code",h2:"h2",li:"li",mermaid:"mermaid",ul:"ul",...(0,s.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Erstelle die Klassen ",(0,r.jsx)(n.code,{children:"Author"}),", ",(0,r.jsx)(n.code,{children:"Book"}),", ",(0,r.jsx)(n.code,{children:"BookCollection"})," und\n",(0,r.jsx)(n.code,{children:"DuplicateKeyException"})," anhand des abgebildeten Klassendiagramms"]}),"\n",(0,r.jsx)(n.li,{children:"Erstelle eine ausf\xfchrbare Klasse, welche eine B\xfcchersammlung mit mehreren\nAutoren und B\xfcchern erzeugt und den flei\xdfigsten Autoren auf der Konsole\nausgibt"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n BookCollection o-- Author\n BookCollection o-- Book\n\n class Author {\n <>\n -name String\n }\n\n class Book {\n <>\n -title String\n }\n\n class BookCollection {\n <>\n -collection Map~Author‚ List~Book~~\n +addAuthor(author Author) void\n +addBook(author Author, book Book) void\n +getMostDiligentAuthor() Author\n +getBookByTitle(title String) Book\n }"}),"\n",(0,r.jsx)(n.h2,{id:"hinweise-zur-klasse-bookcollection",children:"Hinweise zur Klasse BookCollection"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void addAuthor(author: Author)"})," soll den eingehenden Autor der\nB\xfcchersammlung hinzuf\xfcgen. F\xfcr den Fall, dass der Autor bereits in der\nB\xfcchersammlung vorhanden ist, soll die Ausnahme ",(0,r.jsx)(n.code,{children:"DuplicateKeyException"}),"\nausgel\xf6st werden"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void addBook(author: Author, book: Book)"})," soll das eingehende\nBuch der B\xfcchersammlung hinzuf\xfcgen"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"Author getMostDiligentAuthor()"})," soll den Autoren mit den meisten\nB\xfcchern in der B\xfcchersammlung zur\xfcckgeben"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"Book getBookByTitle(title: String)"})," soll das Buch zum eingehenden\nBuchtitel zur\xfcckgeben"]}),"\n"]}),"\n",(0,r.jsx)(a.Z,{pullRequest:"66",branchSuffix:"maps/02"})]})}function h(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},85162:(e,n,t)=>{t.d(n,{Z:()=>l});t(67294);var r=t(34334);const s={tabItem:"tabItem_Ymn6"};var a=t(85893);function l(e){let{children:n,hidden:t,className:l}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,r.Z)(s.tabItem,l),hidden:t,children:n})}},74866:(e,n,t)=>{t.d(n,{Z:()=>w});var r=t(67294),s=t(34334),a=t(12466),l=t(16550),o=t(20469),i=t(91980),u=t(67392),c=t(50012);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:s}}=e;return{value:n,label:t,attributes:r,default:s}}))}(t);return function(e){const n=(0,u.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:t}=e;const s=(0,l.k6)(),a=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,i._X)(a),(0,r.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(s.location.search);n.set(a,e),s.replace({...s.location,search:n.toString()})}),[a,s])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,a=h(e),[l,i]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:a}))),[u,d]=m({queryString:t,groupId:s}),[b,g]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,a]=(0,c.Nk)(t);return[s,(0,r.useCallback)((e=>{t&&a.set(e)}),[t,a])]}({groupId:s}),f=(()=>{const e=u??b;return p({value:e,tabValues:a})?e:null})();(0,o.Z)((()=>{f&&i(f)}),[f]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);i(e),d(e),g(e)}),[d,g,a]),tabValues:a}}var g=t(72389);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(85893);function x(e){let{className:n,block:t,selectedValue:r,selectValue:l,tabValues:o}=e;const i=[],{blockElementScrollPositionUntilNextRender:u}=(0,a.o5)(),c=e=>{const n=e.currentTarget,t=i.indexOf(n),s=o[t].value;s!==r&&(u(n),l(s))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const t=i.indexOf(e.currentTarget)+1;n=i[t]??i[0];break}case"ArrowLeft":{const t=i.indexOf(e.currentTarget)-1;n=i[t]??i[i.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.Z)("tabs",{"tabs--block":t},n),children:o.map((e=>{let{value:n,label:t,attributes:a}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>i.push(e),onKeyDown:d,onClick:c,...a,className:(0,s.Z)("tabs__item",f.tabItem,a?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function j(e){let{lazy:n,children:t,selectedValue:s}=e;const a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=a.find((e=>e.props.value===s));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:a.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function k(e){const n=b(e);return(0,v.jsxs)("div",{className:(0,s.Z)("tabs-container",f.tabList),children:[(0,v.jsx)(x,{...e,...n}),(0,v.jsx)(j,{...e,...n})]})}function w(e){const n=(0,g.Z)();return(0,v.jsx)(k,{...e,children:d(e.children)},String(n))}},85521:(e,n,t)=>{t.d(n,{Z:()=>i});t(67294);var r=t(74866),s=t(85162),a=t(39960),l=t(9286),o=t(85893);function i(e){let{pullRequest:n,branchSuffix:t}=e;return(0,o.jsxs)(r.Z,{children:[(0,o.jsxs)(s.Z,{value:"exercise",label:"Exercise",default:!0,children:[(0,o.jsx)(l.Z,{language:"console",children:`git switch exercises/${t}`}),(0,o.jsx)(a.Z,{to:`https://gitpod.io/#https://github.com/jappuccini/java-exercises/blob/exercises/${t}/Exercise.java`,children:(0,o.jsx)("img",{alt:"Open in Gitpod",src:"https://gitpod.io/button/open-in-gitpod.svg"})})]}),(0,o.jsxs)(s.Z,{value:"solution",label:"Solution",children:[(0,o.jsx)(l.Z,{language:"console",children:`git switch solutions/${t}`}),(0,o.jsx)(a.Z,{to:`https://gitpod.io/#https://github.com/jappuccini/java-exercises/blob/solutions/${t}/Exercise.java`,children:(0,o.jsx)("img",{alt:"Open in Gitpod",src:"https://gitpod.io/button/open-in-gitpod.svg"})})]}),(0,o.jsxs)(s.Z,{value:"pullrequest",label:"Pull Request",children:["Alle \xa0\xc4nderungen zwischen der Aufgabe und der L\xf6sung findest du im Pull Request"," ",(0,o.jsxs)(a.Z,{to:`https://github.com/jappuccini/java-exercises/pull/${n}/files?diff=split`,children:["PR#",n]})]})]})}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/91c34f41.266c042b.js b/pr-preview/pr-75/assets/js/91c34f41.73d19cc9.js
similarity index 74%
rename from pr-preview/pr-75/assets/js/91c34f41.266c042b.js
rename to pr-preview/pr-75/assets/js/91c34f41.73d19cc9.js
index ad0b8a3f27..4c8f482828 100644
--- a/pr-preview/pr-75/assets/js/91c34f41.266c042b.js
+++ b/pr-preview/pr-75/assets/js/91c34f41.73d19cc9.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[6199],{3321:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>t,default:()=>d,frontMatter:()=>r,metadata:()=>i,toc:()=>p});var a=s(85893),o=s(11151);const r={title:"Optionals02",description:""},t=void 0,i={id:"exercises/optionals/optionals02",title:"Optionals02",description:"",source:"@site/docs/exercises/optionals/optionals02.md",sourceDirName:"exercises/optionals",slug:"/exercises/optionals/optionals02",permalink:"/java-docs/pr-preview/pr-75/exercises/optionals/optionals02",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exercises/optionals/optionals02.md",tags:[],version:"current",frontMatter:{title:"Optionals02",description:""},sidebar:"exercisesSidebar",previous:{title:"Optionals01",permalink:"/java-docs/pr-preview/pr-75/exercises/optionals/optionals01"},next:{title:"Optionals03",permalink:"/java-docs/pr-preview/pr-75/exercises/optionals/optionals03"}},l={},p=[{value:"Klassendiagramm",id:"klassendiagramm",level:2}];function c(e){const n={a:"a",code:"code",h2:"h2",li:"li",mermaid:"mermaid",ul:"ul",...(0,o.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Passe die Klasse ",(0,a.jsx)(n.code,{children:"TelephoneBook"})," aus \xdcbungsaufgabe ",(0,a.jsx)(n.a,{href:"../maps/maps01",children:"Maps01"}),"\nanhand des abgebildeten Klassendiagramms an"]}),"\n",(0,a.jsxs)(n.li,{children:["Passe die ausf\xfchrbare Klasse aus \xdcbungsaufgabe ",(0,a.jsx)(n.a,{href:"../maps/maps01",children:"Maps01"})," so an,\ndass entweder die gefundenen Werte oder alternativ entsprechende Meldungen\nausgegeben werden"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,a.jsx)(n.mermaid,{value:"classDiagram\n TelephoneBook o-- Person\n TelephoneBook o-- TelephoneNumber\n\n class Person {\n <>\n -name String\n }\n\n class TelephoneNumber {\n <>\n -value String\n }\n\n class TelephoneBook {\n <>\n -entries Map~Person, TelephoneNumber~\n +addEntry(person Person, telephoneNumber TelephoneNumber) void\n +getTelephoneNumberByName(name String) Optional~TelephoneNumber~\n }"})]})}function d(e={}){const{wrapper:n}={...(0,o.a)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},11151:(e,n,s)=>{s.d(n,{Z:()=>i,a:()=>t});var a=s(67294);const o={},r=a.createContext(o);function t(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:t(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[6199],{3321:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>t,default:()=>d,frontMatter:()=>r,metadata:()=>i,toc:()=>p});var a=s(85893),o=s(11151);const r={title:"Optionals02",description:""},t=void 0,i={id:"exercises/optionals/optionals02",title:"Optionals02",description:"",source:"@site/docs/exercises/optionals/optionals02.md",sourceDirName:"exercises/optionals",slug:"/exercises/optionals/optionals02",permalink:"/java-docs/pr-preview/pr-75/exercises/optionals/optionals02",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exercises/optionals/optionals02.md",tags:[],version:"current",frontMatter:{title:"Optionals02",description:""},sidebar:"exercisesSidebar",previous:{title:"Optionals01",permalink:"/java-docs/pr-preview/pr-75/exercises/optionals/optionals01"},next:{title:"Optionals03",permalink:"/java-docs/pr-preview/pr-75/exercises/optionals/optionals03"}},l={},p=[{value:"Klassendiagramm",id:"klassendiagramm",level:2}];function c(e){const n={a:"a",code:"code",h2:"h2",li:"li",mermaid:"mermaid",ul:"ul",...(0,o.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Passe die Klasse ",(0,a.jsx)(n.code,{children:"TelephoneBook"})," aus \xdcbungsaufgabe ",(0,a.jsx)(n.a,{href:"../maps/maps01",children:"Maps01"}),"\nanhand des abgebildeten Klassendiagramms an"]}),"\n",(0,a.jsxs)(n.li,{children:["Passe die ausf\xfchrbare Klasse aus \xdcbungsaufgabe ",(0,a.jsx)(n.a,{href:"../maps/maps01",children:"Maps01"})," so an,\ndass entweder die gefundenen Werte oder alternativ entsprechende Meldungen\nausgegeben werden"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,a.jsx)(n.mermaid,{value:"classDiagram\n TelephoneBook o-- Person\n TelephoneBook o-- TelephoneNumber\n\n class Person {\n <>\n -name String\n }\n\n class TelephoneNumber {\n <>\n -value String\n }\n\n class TelephoneBook {\n <>\n -entries Map~Person‚ TelephoneNumber~\n +addEntry(person Person, telephoneNumber TelephoneNumber) void\n +getTelephoneNumberByName(name String) Optional~TelephoneNumber~\n }"})]})}function d(e={}){const{wrapper:n}={...(0,o.a)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},11151:(e,n,s)=>{s.d(n,{Z:()=>i,a:()=>t});var a=s(67294);const o={},r=a.createContext(o);function t(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:t(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/94b4fc3c.11427817.js b/pr-preview/pr-75/assets/js/94b4fc3c.11427817.js
deleted file mode 100644
index 64ed1ac01b..0000000000
--- a/pr-preview/pr-75/assets/js/94b4fc3c.11427817.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[5066],{29228:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>u,contentTitle:()=>l,default:()=>c,frontMatter:()=>a,metadata:()=>t,toc:()=>d});var r=s(85893),i=s(11151);const a={title:"Musterklausur",description:"",sidebar_position:20,tags:[]},l=void 0,t={id:"additional-material/daniel-java2/sample-exam",title:"Musterklausur",description:"",source:"@site/docs/additional-material/daniel-java2/sample-exam.md",sourceDirName:"additional-material/daniel-java2",slug:"/additional-material/daniel-java2/sample-exam",permalink:"/java-docs/pr-preview/pr-75/additional-material/daniel-java2/sample-exam",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/additional-material/daniel-java2/sample-exam.md",tags:[],version:"current",sidebarPosition:20,frontMatter:{title:"Musterklausur",description:"",sidebar_position:20,tags:[]},sidebar:"additionalMaterialSidebar",previous:{title:"Daniel (Programmierung 2)",permalink:"/java-docs/pr-preview/pr-75/additional-material/daniel-java2/"},next:{title:"Cheatsheet",permalink:"/java-docs/pr-preview/pr-75/additional-material/daniel-java2/cheatsheet"}},u={},d=[{value:"Hinweise zur Klausur",id:"hinweise-zur-klausur",level:2},{value:"Aufgabe 1 (14 Punkte)",id:"aufgabe-1-14-punkte",level:2},{value:"Klassendiagramm",id:"klassendiagramm",level:3},{value:"Hinweise zur Klasse SuperLeagueTest",id:"hinweise-zur-klasse-superleaguetest",level:3},{value:"Hinweis zur Klasse SuperLeague",id:"hinweis-zur-klasse-superleague",level:3},{value:"Musterl\xf6sung",id:"musterl\xf6sung",level:3},{value:"Aufgabe 2 (16 Punkte)",id:"aufgabe-2-16-punkte",level:2},{value:"Klassendiagramm",id:"klassendiagramm-1",level:3},{value:"Hinweise zur Klasse SuperLeague<T extends SuperHuman>",id:"hinweise-zur-klasse-superleaguet-extends-superhuman",level:3},{value:"Musterl\xf6sung",id:"musterl\xf6sung-1",level:3},{value:"Aufgabe 3 (22 Punkte)",id:"aufgabe-3-22-punkte",level:2},{value:"Klassendiagramm",id:"klassendiagramm-2",level:3},{value:"Hinweise zur Klasse SingleQueries",id:"hinweise-zur-klasse-singlequeries",level:3},{value:"Musterl\xf6sung",id:"musterl\xf6sung-2",level:3}];function o(e){const n={code:"code",em:"em",h2:"h2",h3:"h3",li:"li",mermaid:"mermaid",p:"p",pre:"pre",ul:"ul",...(0,i.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"hinweise-zur-klausur",children:"Hinweise zur Klausur"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Die in dieser Klausur verwendeten Personenbezeichnungen beziehen sich \u2013 sofern\nnicht anders kenntlich gemacht \u2013 auf alle Geschlechter"}),"\n",(0,r.jsx)(n.li,{children:"Es kann davon ausgegangen werden, dass s\xe4mtliche Klassen entsprechende\nImplementierungen der Object-Methoden besitzen"}),"\n",(0,r.jsxs)(n.li,{children:["Der Stereotyp ",(0,r.jsx)(n.code,{children:"<>"})," impliziert, dass die Datenklasse einen\nentsprechenden Konstruktor, Getter zu allen Attributen sowie entsprechende\nImplementierungen der Object-Methoden besitzt"]}),"\n",(0,r.jsxs)(n.li,{children:["Der Stereotyp ",(0,r.jsx)(n.code,{children:"<>"})," impliziert, dass die Aufz\xe4hlung einen\npassenden, privaten Konstruktor sowie gegebenenfalls passende Getter f\xfcr alle\nAttribute besitzt"]}),"\n",(0,r.jsx)(n.li,{children:"Pakete und Klassenimporte m\xfcssen nicht angegeben werden"}),"\n",(0,r.jsxs)(n.li,{children:["F\xfcr die Konsolenausgabe kann das K\xfcrzel ",(0,r.jsx)(n.em,{children:"sysout"})," verwendet werden"]}),"\n",(0,r.jsxs)(n.li,{children:["Methoden- und Attributsbezeichner d\xfcrfen sinnvoll gek\xfcrzt geschrieben werden\n(Beispiel ",(0,r.jsx)(n.em,{children:"testGMPSH()"})," statt ",(0,r.jsx)(n.em,{children:"testGetMostPowerfulSuperHuman()"}),")"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"aufgabe-1-14-punkte",children:"Aufgabe 1 (14 Punkte)"}),"\n",(0,r.jsxs)(n.p,{children:["Erstelle die JUnit-5-Testklasse ",(0,r.jsx)(n.code,{children:"SuperLeagueTest"})," anhand des abgebildeten\nKlassendiagramms."]}),"\n",(0,r.jsx)(n.h3,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n SuperHuman <|-- Villain\n SuperHuman <|-- Hero\n SuperHuman o-- Universe\n SuperLeague~T extends SuperHuman~ o-- Universe\n SuperLeagueTest o-- Hero\n SuperLeagueTest o-- SuperLeague\n\n class SuperHuman {\n <>\n -name String\n -universe Universe\n -power int\n +SuperHuman(name String, universe Universe, power int)\n +name() String\n +universe() Universe\n +power() int\n }\n\n class Villain {\n +Villain(name String, universe Universe, power int)\n }\n\n class Hero {\n +Hero(name String, universe Universe, power int)\n }\n\n class Universe {\n <>\n MARVEL\n DC\n }\n\n class SuperLeague~T extends SuperHuman~ {\n <>\n -name String\n -universe Universe\n -members Map~T, Boolean~\n +addSuperHuman(t T) void\n +getMostPowerfulSuperHuman() Optional~T~\n +getAllAvailableSuperHumans() List~T~\n +sendSuperHumanOnMission(t T) void\n }\n\n class SuperLeagueTest {\n -avengers SuperLeague~Hero~\n -superman Hero\n -ironman Hero\n -spiderman Hero\n +setUp() void\n +testAddSuperHuman() void\n +testGetAllAvailableSuperHumans() void\n +testGetMostPowerfulSuperHuman() void\n }"}),"\n",(0,r.jsx)(n.h3,{id:"hinweise-zur-klasse-superleaguetest",children:"Hinweise zur Klasse SuperLeagueTest"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Die Lebenszyklus-Methode ",(0,r.jsx)(n.code,{children:"void setUp()"})," soll das nachfolgende Testszenario\naufbauen:","\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Es sollen die Superhelden Superman (DC, St\xe4rke 10), Iron Man (MARVEL, 7) und\nSpider-Man (MARVEL, 8) erstellt und den entsprechenden Attributen zugewiesen\nwerden"}),"\n",(0,r.jsxs)(n.li,{children:["Es soll eine MARVEL-Superheldenliga mit dem Namen ",(0,r.jsx)(n.em,{children:"Avengers"})," erstellt und\ndem entsprechenden Attribut zugewiesen werden"]}),"\n",(0,r.jsx)(n.li,{children:"Die Superhelden Iron Man und Spider-Man sollen den Avengers als verf\xfcgbaren\nSuperhelden hinzugef\xfcgt werden"}),"\n",(0,r.jsx)(n.li,{children:"Der Superheld mit dem Namen Spider-Man soll auf eine Mission geschickt\nwerden"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Testmethode ",(0,r.jsx)(n.code,{children:"void testAddSuperHuman()"})," soll pr\xfcfen, ob beim Aufruf der\nMethode ",(0,r.jsx)(n.code,{children:"void addSuperHuman(t: T)"})," auf das Attribut ",(0,r.jsx)(n.code,{children:"avengers"})," mit dem Wert\n",(0,r.jsx)(n.code,{children:"superman"})," die Ausnahme ",(0,r.jsx)(n.code,{children:"WrongUniverseException"})," ausgel\xf6st wird"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Testmethode ",(0,r.jsx)(n.code,{children:"void testGetAllAvailableSuperHumans()"})," soll pr\xfcfen, ob beim\nAufruf der Methode ",(0,r.jsx)(n.code,{children:"List getAllAvailableSuperHumans()"})," auf das Attribut\n",(0,r.jsx)(n.code,{children:"avengers"})," eine Liste der Gr\xf6\xdfe 1 zur\xfcckgegeben wird"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Testmethode ",(0,r.jsx)(n.code,{children:"void testGetMostPowerfulSuperHuman()"})," soll pr\xfcfen, ob beim\nAufruf der Methode ",(0,r.jsx)(n.code,{children:"Optional getMostPowerfulSuperHuman()"})," auf das Attribut\n",(0,r.jsx)(n.code,{children:"avengers"})," der Superheld Spider-Man als Optional zur\xfcckgegeben wird"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"hinweis-zur-klasse-superleague",children:"Hinweis zur Klasse SuperLeague"}),"\n",(0,r.jsxs)(n.p,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void addSuperHuman(t: T)"})," kann die Ausnahme\n",(0,r.jsx)(n.code,{children:"WrongUniverseException"})," ausl\xf6sen."]}),"\n",(0,r.jsx)(n.h3,{id:"musterl\xf6sung",children:"Musterl\xf6sung"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",metastring:'title="SuperLeagueTest.java" showLineNumbers',children:'public class SuperLeagueTest { // 0,5\n\n private SuperLeague avengers; // 0,25\n private Hero superman; // 0,25\n private Hero ironman; // 0,25\n private Hero spiderman; // 0,25\n\n @BeforeEach // 0,25\n void setUp() throws WrongUniverseException { // 0,75\n superman = new Hero("Superman", Universe.DC, 10); // 1\n ironman = new Hero("Iron Man", Universe.MARVEL, 7); // 1\n spiderman = new Hero("Spider-Man", Universe.MARVEL, 8); // 1\n avengers = new SuperLeague<>("Avengers", Universe.MARVEL, new HashMap<>()); // 1\n avengers.addSuperHuman(ironman); // 1\n avengers.addSuperHuman(spiderman); // 1\n avengers.sendSuperHumanOnMission(spiderman); // 0,5\n }\n\n @Test // 0,25\n void testAddSuperHuman() { // 0,25\n assertThrows(WrongUniverseException.class, () -> avengers.addSuperHuman(superman)); // 1\n }\n\n @Test // 0,25\n void testGetAllAvailableSuperHumans() { // 0,25\n assertEquals(1, avengers.getAllAvailableSuperHumans().size()); // 1\n }\n\n @Test // 0,25\n void testGetMostPowerfulSuperHuman() { // 0,25\n assertEquals(spiderman, avengers.getMostPowerfulSuperHuman().get()); // 1,5\n }\n\n}\n'})}),"\n",(0,r.jsx)(n.h2,{id:"aufgabe-2-16-punkte",children:"Aufgabe 2 (16 Punkte)"}),"\n",(0,r.jsxs)(n.p,{children:["Erstelle die Klasse ",(0,r.jsx)(n.code,{children:"SuperLeague"})," anhand des abgebildeten\nKlassendiagrams."]}),"\n",(0,r.jsx)(n.h3,{id:"klassendiagramm-1",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n SuperHuman <|-- Villain\n SuperHuman <|-- Hero\n SuperHuman o-- Universe\n SuperLeague~T extends SuperHuman~ o-- Universe\n\n class SuperHuman {\n <>\n -name String\n -universe Universe\n -power int\n +SuperHuman(name String, universe Universe, power int)\n +name() String\n +universe() Universe\n +power() int\n }\n\n class Villain {\n +Villain(name String, universe Universe, power int)\n }\n\n class Hero {\n +Hero(name String, universe Universe, power int)\n }\n\n class Universe {\n <>\n MARVEL\n DC\n }\n\n class SuperLeague~T extends SuperHuman~ {\n <>\n -name String\n -universe Universe\n -members Map~T, Boolean~\n +addSuperHuman(t T) void\n +getMostPowerfulSuperHuman() Optional~T~\n +getAllAvailableSuperHumans() List~T~\n +sendSuperHumanOnMission(t T) void\n }"}),"\n",(0,r.jsx)(n.h3,{id:"hinweise-zur-klasse-superleaguet-extends-superhuman",children:"Hinweise zur Klasse SuperLeague"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Der Assoziativspeicher ",(0,r.jsx)(n.code,{children:"members"})," beinhaltet als Schl\xfcssel alle \xdcbermenschen\nder Liga sowie als Wert deren Verf\xfcgbarkeit (verf\xfcgbar: ",(0,r.jsx)(n.code,{children:"true"}),", nicht\nverf\xfcgbar: ",(0,r.jsx)(n.code,{children:"false"}),")"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"Optional getMostPowerfulSuperHuman()"})," soll den st\xe4rksten\n\xdcbermenschen der Liga als Optional zur\xfcckgeben"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void addSuperHuman(t: T)"})," soll der Liga den eingehenden\n\xdcbermenschen als verf\xfcgbares Mitglied hinzuf\xfcgen. F\xfcr den Fall, dass das\nUniversum des eingehenden \xdcbermenschen nicht dem Universum der Liga\nentspricht, soll die Ausnahme ",(0,r.jsx)(n.code,{children:"WrongUniverseException"})," ausgel\xf6st werden"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"List getAllAvailableSuperHumans()"})," soll alle verf\xfcgbaren\n\xdcbermenschen der Liga als Liste zur\xfcckgeben"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void sendSuperHumanOnMission(t: T)"})," soll die Verf\xfcgbarkeit des\neingehenden \xdcbermenschen auf nicht verf\xfcgbar setzen"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"musterl\xf6sung-1",children:"Musterl\xf6sung"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",metastring:'title="SuperLeage.java" showLineNumbers',children:"public record SuperLeague\n (String name, Universe universe, Map members) { // 1\n\n public Optional getMostPowerfulSuperHuman() { // 0,5\n T mostPowerfulSuperHuman = null; // 0,5\n int power = 0; // 0,5\n for (T t : members.keySet()) { // 1\n if (t.power() > power) { // 0,5\n power = t.power(); // 0,5\n mostPowerfulSuperHuman = t; // 0,5\n }\n }\n return Optional.ofNullable(mostPowerfulSuperHuman); // 1\n }\n\n public void addSuperHuman(T t) throws WrongUniverseException { // 1\n if (!t.universe().equals(universe)) { // 1\n throw new WrongUniverseException(); // 1\n }\n\n members.put(t, true); // 1\n }\n\n public List getAllAvailableSuperHumans() { // 0,5\n List allAvailableSuperHumans = new ArrayList<>(); // 0,5\n for (Entry entry : members.entrySet()) { // 1\n if (entry.getValue().equals(true)) { // 1\n allAvailableSuperHumans.add(entry.getKey()); // 1\n }\n }\n return allAvailableSuperHumans; // 0,5\n }\n\n public void sendSuperHumanOnMission(T t) { // 0,5\n members.put(t, false); // 1\n }\n\n}\n"})}),"\n",(0,r.jsx)(n.h2,{id:"aufgabe-3-22-punkte",children:"Aufgabe 3 (22 Punkte)"}),"\n",(0,r.jsxs)(n.p,{children:["Erstelle die Klasse ",(0,r.jsx)(n.code,{children:"SingleQueries"})," anhand des abgebildeten Klassendiagramms."]}),"\n",(0,r.jsx)(n.h3,{id:"klassendiagramm-2",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n Single o-- Artist\n Artist o-- Country\n SingleQueries o-- Single\n\n class Single {\n <>\n -name String\n -artist Artist\n -salesInMillions int\n -publishingYear String\n }\n\n class Artist {\n <>\n -name String\n -country Country\n -birthdate LocalDate\n -isAlive boolean\n }\n\n class Country {\n <>\n BRB\n CHN\n FRA\n GBR\n ITA\n PRI\n USA\n }\n\n class SingleQueries {\n <>\n -singles List~Single~\n +printAllSinglesWithMoreThan25MillionSalesPerCountry() void\n +printAverageBirthYearOfAllDeceasedArtists() void\n +isAnySingleFromChinaWithMoreThan10MillionSales() boolean\n +getTop3SinglesOfThisCenturyBySalesInMillions() List~String~\n +getAllSinglesFromEdSheeran() List~Single~\n }"}),"\n",(0,r.jsx)(n.h3,{id:"hinweise-zur-klasse-singlequeries",children:"Hinweise zur Klasse SingleQueries"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void printAllSinglesWithMoreThan25MillionSalesPerCountry()"})," soll\nalle Singles, die sich mehr als 25 Millionen mal verkauft haben, gruppiert\nnach dem Land in der Form ",(0,r.jsx)(n.em,{children:"[Land]: [[Single], [Single],...]"})," ausgeben"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void printAverageBirthYearOfAllDeceasedArtists()"})," soll das\ndurchschnittliche Geburtsjahr aller verstorbenen K\xfcnstler bzw. aller\nverstorbenen K\xfcnstlerinnen ausgeben. F\xfcr den Fall, dass es keinen verstorbenen\nK\xfcnstler bzw. keine verstorbene K\xfcnstlerin gibt, soll der Wert -1 ausgegeben\nwerden"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"boolean isAnySingleFromChinaWithMoreThan10MillionSales()"})," soll\nzur\xfcckgeben, ob es eine Single eines K\xfcnstlers bzw. einer K\xfcnstlerin aus China\ngibt, welches sich mehr als 10 Millionen Mal verkauft hat"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"List getTop3SinglesOfThisCenturyBySalesInMillions()"})," soll\ndie 3 am h\xe4ufigsten verkauften Singles des jetzigen Jahrtausends sortiert nach\nder Anzahl Verk\xe4ufe in Millionen in der Form ",(0,r.jsx)(n.em,{children:"[Name der Single]: [Name des\nK\xfcnstlers bzw. Name der K\xfcnstlerin], [Verk\xe4ufe in Millionen] Millionen"}),"\nzur\xfcckgeben"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"List getAllSinglesFromEdSheeran()"})," soll alle Singles des\nK\xfcnstlers Ed Sheeran (Land: Gro\xdfbritannien, Geburtstag: 17.02.1991, Status:\nlebendig) zur\xfcckgeben"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"musterl\xf6sung-2",children:"Musterl\xf6sung"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",metastring:'title="SingleQueries" showLineNumbers',children:'public record SingleQueries(List singles) { // 1\n\n public void a() { // 0,5\n Map> tmp = singles.stream() // 1\n .filter(a -> a.salesInMillions() > 25) // 0,5\n .collect(Collectors.groupingBy(a -> a.artist().country())); // 1\n\n tmp.forEach((c, sl) -> System.out.println(c + ": " + sl); // 1\n }\n }\n\n public void b() { // 0,5\n OptionalDouble tmp = singles.stream() // 1\n .map(a -> a.artist()) // 0,5\n .distinct() // 0,5\n .filter(a -> !a.isAlive()) // 0,5\n .mapToInt(a -> a.birthdate().getYear()) // 1\n .average(); // 0,5\n\n tmp.ifPresentOrElse(System.out::println, () -> System.out.println(-1)); // 1\n }\n\n public boolean c() { // 0,5\n return singles.stream() // 1\n .anyMatch(a -> a.salesInMillions() > 10 // 0,5\n && a.artist().country().equals(Country.CHN)); // 1\n }\n\n public List d() { // 0,5\n return singles.stream() // 1\n .filter(a -> a.publishingYear().compareTo("2000") > 0) // 1\n .sorted((a1, a2) -> Integer.valueOf(a2.salesInMillions()).compareTo(a1.salesInMillions())) // 1\n .map(a -> a.name() + ": " + a.artist().name() + ", " + a.salesInMillions() + " Millionen") // 1\n .limit(3) // 0,5\n .toList(); // 0,5\n }\n\n public List e() { // 0,5\n return singles.stream() // 1\n .filter(a -> a.artist().equals(\n new Artist("Ed Sheeran", Country.GBR, LocalDate.of(1991, 2, 17), true))) // 1\n .toList(); // 0,5\n }\n\n}\n'})})]})}function c(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(o,{...e})}):o(e)}},11151:(e,n,s)=>{s.d(n,{Z:()=>t,a:()=>l});var r=s(67294);const i={},a=r.createContext(i);function l(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/94b4fc3c.784bb578.js b/pr-preview/pr-75/assets/js/94b4fc3c.784bb578.js
new file mode 100644
index 0000000000..5d2653bd5b
--- /dev/null
+++ b/pr-preview/pr-75/assets/js/94b4fc3c.784bb578.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[5066],{29228:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>u,contentTitle:()=>l,default:()=>c,frontMatter:()=>a,metadata:()=>t,toc:()=>d});var r=s(85893),i=s(11151);const a={title:"Musterklausur",description:"",sidebar_position:20,tags:[]},l=void 0,t={id:"additional-material/daniel-java2/sample-exam",title:"Musterklausur",description:"",source:"@site/docs/additional-material/daniel-java2/sample-exam.md",sourceDirName:"additional-material/daniel-java2",slug:"/additional-material/daniel-java2/sample-exam",permalink:"/java-docs/pr-preview/pr-75/additional-material/daniel-java2/sample-exam",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/additional-material/daniel-java2/sample-exam.md",tags:[],version:"current",sidebarPosition:20,frontMatter:{title:"Musterklausur",description:"",sidebar_position:20,tags:[]},sidebar:"additionalMaterialSidebar",previous:{title:"Daniel (Programmierung 2)",permalink:"/java-docs/pr-preview/pr-75/additional-material/daniel-java2/"},next:{title:"Cheatsheet",permalink:"/java-docs/pr-preview/pr-75/additional-material/daniel-java2/cheatsheet"}},u={},d=[{value:"Hinweise zur Klausur",id:"hinweise-zur-klausur",level:2},{value:"Aufgabe 1 (14 Punkte)",id:"aufgabe-1-14-punkte",level:2},{value:"Klassendiagramm",id:"klassendiagramm",level:3},{value:"Hinweise zur Klasse SuperLeagueTest",id:"hinweise-zur-klasse-superleaguetest",level:3},{value:"Hinweis zur Klasse SuperLeague",id:"hinweis-zur-klasse-superleague",level:3},{value:"Musterl\xf6sung",id:"musterl\xf6sung",level:3},{value:"Aufgabe 2 (16 Punkte)",id:"aufgabe-2-16-punkte",level:2},{value:"Klassendiagramm",id:"klassendiagramm-1",level:3},{value:"Hinweise zur Klasse SuperLeague<T extends SuperHuman>",id:"hinweise-zur-klasse-superleaguet-extends-superhuman",level:3},{value:"Musterl\xf6sung",id:"musterl\xf6sung-1",level:3},{value:"Aufgabe 3 (22 Punkte)",id:"aufgabe-3-22-punkte",level:2},{value:"Klassendiagramm",id:"klassendiagramm-2",level:3},{value:"Hinweise zur Klasse SingleQueries",id:"hinweise-zur-klasse-singlequeries",level:3},{value:"Musterl\xf6sung",id:"musterl\xf6sung-2",level:3}];function o(e){const n={code:"code",em:"em",h2:"h2",h3:"h3",li:"li",mermaid:"mermaid",p:"p",pre:"pre",ul:"ul",...(0,i.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"hinweise-zur-klausur",children:"Hinweise zur Klausur"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Die in dieser Klausur verwendeten Personenbezeichnungen beziehen sich \u2013 sofern\nnicht anders kenntlich gemacht \u2013 auf alle Geschlechter"}),"\n",(0,r.jsx)(n.li,{children:"Es kann davon ausgegangen werden, dass s\xe4mtliche Klassen entsprechende\nImplementierungen der Object-Methoden besitzen"}),"\n",(0,r.jsxs)(n.li,{children:["Der Stereotyp ",(0,r.jsx)(n.code,{children:"<>"})," impliziert, dass die Datenklasse einen\nentsprechenden Konstruktor, Getter zu allen Attributen sowie entsprechende\nImplementierungen der Object-Methoden besitzt"]}),"\n",(0,r.jsxs)(n.li,{children:["Der Stereotyp ",(0,r.jsx)(n.code,{children:"<>"})," impliziert, dass die Aufz\xe4hlung einen\npassenden, privaten Konstruktor sowie gegebenenfalls passende Getter f\xfcr alle\nAttribute besitzt"]}),"\n",(0,r.jsx)(n.li,{children:"Pakete und Klassenimporte m\xfcssen nicht angegeben werden"}),"\n",(0,r.jsxs)(n.li,{children:["F\xfcr die Konsolenausgabe kann das K\xfcrzel ",(0,r.jsx)(n.em,{children:"sysout"})," verwendet werden"]}),"\n",(0,r.jsxs)(n.li,{children:["Methoden- und Attributsbezeichner d\xfcrfen sinnvoll gek\xfcrzt geschrieben werden\n(Beispiel ",(0,r.jsx)(n.em,{children:"testGMPSH()"})," statt ",(0,r.jsx)(n.em,{children:"testGetMostPowerfulSuperHuman()"}),")"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"aufgabe-1-14-punkte",children:"Aufgabe 1 (14 Punkte)"}),"\n",(0,r.jsxs)(n.p,{children:["Erstelle die JUnit-5-Testklasse ",(0,r.jsx)(n.code,{children:"SuperLeagueTest"})," anhand des abgebildeten\nKlassendiagramms."]}),"\n",(0,r.jsx)(n.h3,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n SuperHuman <|-- Villain\n SuperHuman <|-- Hero\n SuperHuman o-- Universe\n SuperLeague~T extends SuperHuman~ o-- Universe\n SuperLeagueTest o-- Hero\n SuperLeagueTest o-- SuperLeague\n\n class SuperHuman {\n <>\n -name String\n -universe Universe\n -power int\n +SuperHuman(name String, universe Universe, power int)\n +name() String\n +universe() Universe\n +power() int\n }\n\n class Villain {\n +Villain(name String, universe Universe, power int)\n }\n\n class Hero {\n +Hero(name String, universe Universe, power int)\n }\n\n class Universe {\n <>\n MARVEL\n DC\n }\n\n class SuperLeague~T extends SuperHuman~ {\n <>\n -name String\n -universe Universe\n -members Map~T‚ Boolean~\n +addSuperHuman(t T) void\n +getMostPowerfulSuperHuman() Optional~T~\n +getAllAvailableSuperHumans() List~T~\n +sendSuperHumanOnMission(t T) void\n }\n\n class SuperLeagueTest {\n -avengers SuperLeague~Hero~\n -superman Hero\n -ironman Hero\n -spiderman Hero\n +setUp() void\n +testAddSuperHuman() void\n +testGetAllAvailableSuperHumans() void\n +testGetMostPowerfulSuperHuman() void\n }"}),"\n",(0,r.jsx)(n.h3,{id:"hinweise-zur-klasse-superleaguetest",children:"Hinweise zur Klasse SuperLeagueTest"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Die Lebenszyklus-Methode ",(0,r.jsx)(n.code,{children:"void setUp()"})," soll das nachfolgende Testszenario\naufbauen:","\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Es sollen die Superhelden Superman (DC, St\xe4rke 10), Iron Man (MARVEL, 7) und\nSpider-Man (MARVEL, 8) erstellt und den entsprechenden Attributen zugewiesen\nwerden"}),"\n",(0,r.jsxs)(n.li,{children:["Es soll eine MARVEL-Superheldenliga mit dem Namen ",(0,r.jsx)(n.em,{children:"Avengers"})," erstellt und\ndem entsprechenden Attribut zugewiesen werden"]}),"\n",(0,r.jsx)(n.li,{children:"Die Superhelden Iron Man und Spider-Man sollen den Avengers als verf\xfcgbaren\nSuperhelden hinzugef\xfcgt werden"}),"\n",(0,r.jsx)(n.li,{children:"Der Superheld mit dem Namen Spider-Man soll auf eine Mission geschickt\nwerden"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Testmethode ",(0,r.jsx)(n.code,{children:"void testAddSuperHuman()"})," soll pr\xfcfen, ob beim Aufruf der\nMethode ",(0,r.jsx)(n.code,{children:"void addSuperHuman(t: T)"})," auf das Attribut ",(0,r.jsx)(n.code,{children:"avengers"})," mit dem Wert\n",(0,r.jsx)(n.code,{children:"superman"})," die Ausnahme ",(0,r.jsx)(n.code,{children:"WrongUniverseException"})," ausgel\xf6st wird"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Testmethode ",(0,r.jsx)(n.code,{children:"void testGetAllAvailableSuperHumans()"})," soll pr\xfcfen, ob beim\nAufruf der Methode ",(0,r.jsx)(n.code,{children:"List getAllAvailableSuperHumans()"})," auf das Attribut\n",(0,r.jsx)(n.code,{children:"avengers"})," eine Liste der Gr\xf6\xdfe 1 zur\xfcckgegeben wird"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Testmethode ",(0,r.jsx)(n.code,{children:"void testGetMostPowerfulSuperHuman()"})," soll pr\xfcfen, ob beim\nAufruf der Methode ",(0,r.jsx)(n.code,{children:"Optional getMostPowerfulSuperHuman()"})," auf das Attribut\n",(0,r.jsx)(n.code,{children:"avengers"})," der Superheld Spider-Man als Optional zur\xfcckgegeben wird"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"hinweis-zur-klasse-superleague",children:"Hinweis zur Klasse SuperLeague"}),"\n",(0,r.jsxs)(n.p,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void addSuperHuman(t: T)"})," kann die Ausnahme\n",(0,r.jsx)(n.code,{children:"WrongUniverseException"})," ausl\xf6sen."]}),"\n",(0,r.jsx)(n.h3,{id:"musterl\xf6sung",children:"Musterl\xf6sung"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",metastring:'title="SuperLeagueTest.java" showLineNumbers',children:'public class SuperLeagueTest { // 0,5\n\n private SuperLeague avengers; // 0,25\n private Hero superman; // 0,25\n private Hero ironman; // 0,25\n private Hero spiderman; // 0,25\n\n @BeforeEach // 0,25\n void setUp() throws WrongUniverseException { // 0,75\n superman = new Hero("Superman", Universe.DC, 10); // 1\n ironman = new Hero("Iron Man", Universe.MARVEL, 7); // 1\n spiderman = new Hero("Spider-Man", Universe.MARVEL, 8); // 1\n avengers = new SuperLeague<>("Avengers", Universe.MARVEL, new HashMap<>()); // 1\n avengers.addSuperHuman(ironman); // 1\n avengers.addSuperHuman(spiderman); // 1\n avengers.sendSuperHumanOnMission(spiderman); // 0,5\n }\n\n @Test // 0,25\n void testAddSuperHuman() { // 0,25\n assertThrows(WrongUniverseException.class, () -> avengers.addSuperHuman(superman)); // 1\n }\n\n @Test // 0,25\n void testGetAllAvailableSuperHumans() { // 0,25\n assertEquals(1, avengers.getAllAvailableSuperHumans().size()); // 1\n }\n\n @Test // 0,25\n void testGetMostPowerfulSuperHuman() { // 0,25\n assertEquals(spiderman, avengers.getMostPowerfulSuperHuman().get()); // 1,5\n }\n\n}\n'})}),"\n",(0,r.jsx)(n.h2,{id:"aufgabe-2-16-punkte",children:"Aufgabe 2 (16 Punkte)"}),"\n",(0,r.jsxs)(n.p,{children:["Erstelle die Klasse ",(0,r.jsx)(n.code,{children:"SuperLeague"})," anhand des abgebildeten\nKlassendiagrams."]}),"\n",(0,r.jsx)(n.h3,{id:"klassendiagramm-1",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n SuperHuman <|-- Villain\n SuperHuman <|-- Hero\n SuperHuman o-- Universe\n SuperLeague~T extends SuperHuman~ o-- Universe\n\n class SuperHuman {\n <>\n -name String\n -universe Universe\n -power int\n +SuperHuman(name String, universe Universe, power int)\n +name() String\n +universe() Universe\n +power() int\n }\n\n class Villain {\n +Villain(name String, universe Universe, power int)\n }\n\n class Hero {\n +Hero(name String, universe Universe, power int)\n }\n\n class Universe {\n <>\n MARVEL\n DC\n }\n\n class SuperLeague~T extends SuperHuman~ {\n <>\n -name String\n -universe Universe\n -members Map~T‚ Boolean~\n +addSuperHuman(t T) void\n +getMostPowerfulSuperHuman() Optional~T~\n +getAllAvailableSuperHumans() List~T~\n +sendSuperHumanOnMission(t T) void\n }"}),"\n",(0,r.jsx)(n.h3,{id:"hinweise-zur-klasse-superleaguet-extends-superhuman",children:"Hinweise zur Klasse SuperLeague"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Der Assoziativspeicher ",(0,r.jsx)(n.code,{children:"members"})," beinhaltet als Schl\xfcssel alle \xdcbermenschen\nder Liga sowie als Wert deren Verf\xfcgbarkeit (verf\xfcgbar: ",(0,r.jsx)(n.code,{children:"true"}),", nicht\nverf\xfcgbar: ",(0,r.jsx)(n.code,{children:"false"}),")"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"Optional getMostPowerfulSuperHuman()"})," soll den st\xe4rksten\n\xdcbermenschen der Liga als Optional zur\xfcckgeben"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void addSuperHuman(t: T)"})," soll der Liga den eingehenden\n\xdcbermenschen als verf\xfcgbares Mitglied hinzuf\xfcgen. F\xfcr den Fall, dass das\nUniversum des eingehenden \xdcbermenschen nicht dem Universum der Liga\nentspricht, soll die Ausnahme ",(0,r.jsx)(n.code,{children:"WrongUniverseException"})," ausgel\xf6st werden"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"List getAllAvailableSuperHumans()"})," soll alle verf\xfcgbaren\n\xdcbermenschen der Liga als Liste zur\xfcckgeben"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void sendSuperHumanOnMission(t: T)"})," soll die Verf\xfcgbarkeit des\neingehenden \xdcbermenschen auf nicht verf\xfcgbar setzen"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"musterl\xf6sung-1",children:"Musterl\xf6sung"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",metastring:'title="SuperLeage.java" showLineNumbers',children:"public record SuperLeague\n (String name, Universe universe, Map members) { // 1\n\n public Optional getMostPowerfulSuperHuman() { // 0,5\n T mostPowerfulSuperHuman = null; // 0,5\n int power = 0; // 0,5\n for (T t : members.keySet()) { // 1\n if (t.power() > power) { // 0,5\n power = t.power(); // 0,5\n mostPowerfulSuperHuman = t; // 0,5\n }\n }\n return Optional.ofNullable(mostPowerfulSuperHuman); // 1\n }\n\n public void addSuperHuman(T t) throws WrongUniverseException { // 1\n if (!t.universe().equals(universe)) { // 1\n throw new WrongUniverseException(); // 1\n }\n\n members.put(t, true); // 1\n }\n\n public List getAllAvailableSuperHumans() { // 0,5\n List allAvailableSuperHumans = new ArrayList<>(); // 0,5\n for (Entry entry : members.entrySet()) { // 1\n if (entry.getValue().equals(true)) { // 1\n allAvailableSuperHumans.add(entry.getKey()); // 1\n }\n }\n return allAvailableSuperHumans; // 0,5\n }\n\n public void sendSuperHumanOnMission(T t) { // 0,5\n members.put(t, false); // 1\n }\n\n}\n"})}),"\n",(0,r.jsx)(n.h2,{id:"aufgabe-3-22-punkte",children:"Aufgabe 3 (22 Punkte)"}),"\n",(0,r.jsxs)(n.p,{children:["Erstelle die Klasse ",(0,r.jsx)(n.code,{children:"SingleQueries"})," anhand des abgebildeten Klassendiagramms."]}),"\n",(0,r.jsx)(n.h3,{id:"klassendiagramm-2",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n Single o-- Artist\n Artist o-- Country\n SingleQueries o-- Single\n\n class Single {\n <>\n -name String\n -artist Artist\n -salesInMillions int\n -publishingYear String\n }\n\n class Artist {\n <>\n -name String\n -country Country\n -birthdate LocalDate\n -isAlive boolean\n }\n\n class Country {\n <>\n BRB\n CHN\n FRA\n GBR\n ITA\n PRI\n USA\n }\n\n class SingleQueries {\n <>\n -singles List~Single~\n +printAllSinglesWithMoreThan25MillionSalesPerCountry() void\n +printAverageBirthYearOfAllDeceasedArtists() void\n +isAnySingleFromChinaWithMoreThan10MillionSales() boolean\n +getTop3SinglesOfThisCenturyBySalesInMillions() List~String~\n +getAllSinglesFromEdSheeran() List~Single~\n }"}),"\n",(0,r.jsx)(n.h3,{id:"hinweise-zur-klasse-singlequeries",children:"Hinweise zur Klasse SingleQueries"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void printAllSinglesWithMoreThan25MillionSalesPerCountry()"})," soll\nalle Singles, die sich mehr als 25 Millionen mal verkauft haben, gruppiert\nnach dem Land in der Form ",(0,r.jsx)(n.em,{children:"[Land]: [[Single], [Single],...]"})," ausgeben"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void printAverageBirthYearOfAllDeceasedArtists()"})," soll das\ndurchschnittliche Geburtsjahr aller verstorbenen K\xfcnstler bzw. aller\nverstorbenen K\xfcnstlerinnen ausgeben. F\xfcr den Fall, dass es keinen verstorbenen\nK\xfcnstler bzw. keine verstorbene K\xfcnstlerin gibt, soll der Wert -1 ausgegeben\nwerden"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"boolean isAnySingleFromChinaWithMoreThan10MillionSales()"})," soll\nzur\xfcckgeben, ob es eine Single eines K\xfcnstlers bzw. einer K\xfcnstlerin aus China\ngibt, welches sich mehr als 10 Millionen Mal verkauft hat"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"List getTop3SinglesOfThisCenturyBySalesInMillions()"})," soll\ndie 3 am h\xe4ufigsten verkauften Singles des jetzigen Jahrtausends sortiert nach\nder Anzahl Verk\xe4ufe in Millionen in der Form ",(0,r.jsx)(n.em,{children:"[Name der Single]: [Name des\nK\xfcnstlers bzw. Name der K\xfcnstlerin], [Verk\xe4ufe in Millionen] Millionen"}),"\nzur\xfcckgeben"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"List getAllSinglesFromEdSheeran()"})," soll alle Singles des\nK\xfcnstlers Ed Sheeran (Land: Gro\xdfbritannien, Geburtstag: 17.02.1991, Status:\nlebendig) zur\xfcckgeben"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"musterl\xf6sung-2",children:"Musterl\xf6sung"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",metastring:'title="SingleQueries" showLineNumbers',children:'public record SingleQueries(List singles) { // 1\n\n public void a() { // 0,5\n Map> tmp = singles.stream() // 1\n .filter(a -> a.salesInMillions() > 25) // 0,5\n .collect(Collectors.groupingBy(a -> a.artist().country())); // 1\n\n tmp.forEach((c, sl) -> System.out.println(c + ": " + sl); // 1\n }\n }\n\n public void b() { // 0,5\n OptionalDouble tmp = singles.stream() // 1\n .map(a -> a.artist()) // 0,5\n .distinct() // 0,5\n .filter(a -> !a.isAlive()) // 0,5\n .mapToInt(a -> a.birthdate().getYear()) // 1\n .average(); // 0,5\n\n tmp.ifPresentOrElse(System.out::println, () -> System.out.println(-1)); // 1\n }\n\n public boolean c() { // 0,5\n return singles.stream() // 1\n .anyMatch(a -> a.salesInMillions() > 10 // 0,5\n && a.artist().country().equals(Country.CHN)); // 1\n }\n\n public List d() { // 0,5\n return singles.stream() // 1\n .filter(a -> a.publishingYear().compareTo("2000") > 0) // 1\n .sorted((a1, a2) -> Integer.valueOf(a2.salesInMillions()).compareTo(a1.salesInMillions())) // 1\n .map(a -> a.name() + ": " + a.artist().name() + ", " + a.salesInMillions() + " Millionen") // 1\n .limit(3) // 0,5\n .toList(); // 0,5\n }\n\n public List e() { // 0,5\n return singles.stream() // 1\n .filter(a -> a.artist().equals(\n new Artist("Ed Sheeran", Country.GBR, LocalDate.of(1991, 2, 17), true))) // 1\n .toList(); // 0,5\n }\n\n}\n'})})]})}function c(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(o,{...e})}):o(e)}},11151:(e,n,s)=>{s.d(n,{Z:()=>t,a:()=>l});var r=s(67294);const i={},a=r.createContext(i);function l(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/a518c2df.df6b6499.js b/pr-preview/pr-75/assets/js/a518c2df.f80a9a0a.js
similarity index 73%
rename from pr-preview/pr-75/assets/js/a518c2df.df6b6499.js
rename to pr-preview/pr-75/assets/js/a518c2df.f80a9a0a.js
index 711813f5f4..ecf813646b 100644
--- a/pr-preview/pr-75/assets/js/a518c2df.df6b6499.js
+++ b/pr-preview/pr-75/assets/js/a518c2df.f80a9a0a.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[6144],{57794:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>a,metadata:()=>r,toc:()=>c});var s=o(85893),t=o(11151);const a={title:"Optionals01",description:""},i=void 0,r={id:"exercises/optionals/optionals01",title:"Optionals01",description:"",source:"@site/docs/exercises/optionals/optionals01.md",sourceDirName:"exercises/optionals",slug:"/exercises/optionals/optionals01",permalink:"/java-docs/pr-preview/pr-75/exercises/optionals/optionals01",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exercises/optionals/optionals01.md",tags:[],version:"current",frontMatter:{title:"Optionals01",description:""},sidebar:"exercisesSidebar",previous:{title:"Optionals",permalink:"/java-docs/pr-preview/pr-75/exercises/optionals/"},next:{title:"Optionals02",permalink:"/java-docs/pr-preview/pr-75/exercises/optionals/optionals02"}},l={},c=[{value:"Klassendiagramm",id:"klassendiagramm",level:2}];function d(e){const n={a:"a",code:"code",h2:"h2",li:"li",mermaid:"mermaid",ul:"ul",...(0,t.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Passe die Klasse ",(0,s.jsx)(n.code,{children:"BookCollection"})," aus \xdcbungsaufgabe ",(0,s.jsx)(n.a,{href:"../maps/maps02",children:"Maps02"}),"\nanhand des abgebildeten Klassendiagramms an"]}),"\n",(0,s.jsxs)(n.li,{children:["Passe die ausf\xfchrbare Klasse aus \xdcbungsaufgabe ",(0,s.jsx)(n.a,{href:"../maps/maps02",children:"Maps02"})," so an,\ndass entweder die gefundenen Werte oder alternativ entsprechende Meldungen\nausgegeben werden"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,s.jsx)(n.mermaid,{value:"classDiagram\n BookCollection o-- Author\n BookCollection o-- Book\n\n class Author {\n <>\n -name String\n }\n\n class Book {\n <>\n -title String\n }\n\n class BookCollection {\n <>\n -collection Map~Author, List~Book~~\n +addAuthor(author Author) void\n +addBook(author Author, book Book) void\n +getMostDiligentAuthor() Optional~Author~\n +getBookByTitle(title String) Optional~Book~\n }"})]})}function p(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},11151:(e,n,o)=>{o.d(n,{Z:()=>r,a:()=>i});var s=o(67294);const t={},a=s.createContext(t);function i(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[6144],{57794:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>a,metadata:()=>r,toc:()=>c});var s=o(85893),t=o(11151);const a={title:"Optionals01",description:""},i=void 0,r={id:"exercises/optionals/optionals01",title:"Optionals01",description:"",source:"@site/docs/exercises/optionals/optionals01.md",sourceDirName:"exercises/optionals",slug:"/exercises/optionals/optionals01",permalink:"/java-docs/pr-preview/pr-75/exercises/optionals/optionals01",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exercises/optionals/optionals01.md",tags:[],version:"current",frontMatter:{title:"Optionals01",description:""},sidebar:"exercisesSidebar",previous:{title:"Optionals",permalink:"/java-docs/pr-preview/pr-75/exercises/optionals/"},next:{title:"Optionals02",permalink:"/java-docs/pr-preview/pr-75/exercises/optionals/optionals02"}},l={},c=[{value:"Klassendiagramm",id:"klassendiagramm",level:2}];function d(e){const n={a:"a",code:"code",h2:"h2",li:"li",mermaid:"mermaid",ul:"ul",...(0,t.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Passe die Klasse ",(0,s.jsx)(n.code,{children:"BookCollection"})," aus \xdcbungsaufgabe ",(0,s.jsx)(n.a,{href:"../maps/maps02",children:"Maps02"}),"\nanhand des abgebildeten Klassendiagramms an"]}),"\n",(0,s.jsxs)(n.li,{children:["Passe die ausf\xfchrbare Klasse aus \xdcbungsaufgabe ",(0,s.jsx)(n.a,{href:"../maps/maps02",children:"Maps02"})," so an,\ndass entweder die gefundenen Werte oder alternativ entsprechende Meldungen\nausgegeben werden"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,s.jsx)(n.mermaid,{value:"classDiagram\n BookCollection o-- Author\n BookCollection o-- Book\n\n class Author {\n <>\n -name String\n }\n\n class Book {\n <>\n -title String\n }\n\n class BookCollection {\n <>\n -collection Map~Author‚ List~Book~~\n +addAuthor(author Author) void\n +addBook(author Author, book Book) void\n +getMostDiligentAuthor() Optional~Author~\n +getBookByTitle(title String) Optional~Book~\n }"})]})}function p(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},11151:(e,n,o)=>{o.d(n,{Z:()=>r,a:()=>i});var s=o(67294);const t={},a=s.createContext(t);function i(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/a6ab000b.29480c2d.js b/pr-preview/pr-75/assets/js/a6ab000b.c1059d65.js
similarity index 51%
rename from pr-preview/pr-75/assets/js/a6ab000b.29480c2d.js
rename to pr-preview/pr-75/assets/js/a6ab000b.c1059d65.js
index 93715a191c..595399ce7a 100644
--- a/pr-preview/pr-75/assets/js/a6ab000b.29480c2d.js
+++ b/pr-preview/pr-75/assets/js/a6ab000b.c1059d65.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[9302],{99376:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>d,contentTitle:()=>t,default:()=>p,frontMatter:()=>s,metadata:()=>o,toc:()=>l});var i=n(85893),a=n(11151);const s={title:"W\xf6rterbuch",description:"",tags:["interfaces","comparators","exceptions","records","maps","optionals","io-streams"]},t=void 0,o={id:"exam-exercises/exam-exercises-java2/dictionary",title:"W\xf6rterbuch",description:"",source:"@site/docs/exam-exercises/exam-exercises-java2/dictionary.md",sourceDirName:"exam-exercises/exam-exercises-java2",slug:"/exam-exercises/exam-exercises-java2/dictionary",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/dictionary",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exam-exercises/exam-exercises-java2/dictionary.md",tags:[{label:"interfaces",permalink:"/java-docs/pr-preview/pr-75/tags/interfaces"},{label:"comparators",permalink:"/java-docs/pr-preview/pr-75/tags/comparators"},{label:"exceptions",permalink:"/java-docs/pr-preview/pr-75/tags/exceptions"},{label:"records",permalink:"/java-docs/pr-preview/pr-75/tags/records"},{label:"maps",permalink:"/java-docs/pr-preview/pr-75/tags/maps"},{label:"optionals",permalink:"/java-docs/pr-preview/pr-75/tags/optionals"},{label:"io-streams",permalink:"/java-docs/pr-preview/pr-75/tags/io-streams"}],version:"current",frontMatter:{title:"W\xf6rterbuch",description:"",tags:["interfaces","comparators","exceptions","records","maps","optionals","io-streams"]},sidebar:"examExercisesSidebar",previous:{title:"Tante-Emma-Laden",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/corner-shop"},next:{title:"Personalverwaltung",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/human-resources"}},d={},l=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Allgemeine Hinweise",id:"allgemeine-hinweise",level:2},{value:"Hinweis zur Klasse Word",id:"hinweis-zur-klasse-word",level:2},{value:"Hinweise zur Klasse Dictionary",id:"hinweise-zur-klasse-dictionary",level:2},{value:"Beispielhafter Aufbau der W\xf6rterdatei",id:"beispielhafter-aufbau-der-w\xf6rterdatei",level:2}];function c(e){const r={code:"code",h2:"h2",li:"li",mermaid:"mermaid",p:"p",pre:"pre",ul:"ul",...(0,a.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.p,{children:"Setze das abgebildete Klassendiagramm vollst\xe4ndig um. Erstelle zum Testen eine\nausf\xfchrbare Klasse und/oder eine Testklasse."}),"\n",(0,i.jsx)(r.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,i.jsx)(r.mermaid,{value:"classDiagram\n Comparable~Word~ <|.. Word\n Word o-- Language\n Dictionary o-- Word\n Dictionary o-- Language\n\n class Word {\n <>\n -value String\n -language Language\n +compareTo(other Word) int\n }\n\n class Comparable~Word~ {\n <>\n +compareTo(o Word) int\n }\n\n class Language {\n <>\n DE = DE, Deutsch\n EN = EN, Englisch\n -code String\n -description String\n }\n\n class Dictionary {\n <>\n -sourceLanguage Language\n -targetLanguage Language\n -entries Map~Word, Word~\n +addEntry(sourceWord Word, targetWord Word) void\n +importEntries(file File) void\n +getTranslation(word String) Optional~String~\n }"}),"\n",(0,i.jsx)(r.h2,{id:"allgemeine-hinweise",children:"Allgemeine Hinweise"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsx)(r.li,{children:"Aus Gr\xfcnden der \xdcbersicht werden im Klassendiagramm keine Getter und\nObject-Methoden dargestellt"}),"\n",(0,i.jsx)(r.li,{children:"So nicht anders angegeben, sollen Konstruktoren, Setter, Getter sowie die\nObject-Methoden wie gewohnt implementiert werden"}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"hinweis-zur-klasse-word",children:"Hinweis zur Klasse Word"}),"\n",(0,i.jsxs)(r.p,{children:["Die Methode ",(0,i.jsx)(r.code,{children:"int compareTo(other: Word)"})," soll so implementiert werden, dass\ndamit W\xf6rter aufsteigend nach ihrem Wert sortiert werden k\xf6nnen."]}),"\n",(0,i.jsx)(r.h2,{id:"hinweise-zur-klasse-dictionary",children:"Hinweise zur Klasse Dictionary"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:["Die Methode ",(0,i.jsx)(r.code,{children:"void addEntry(sourceWord: Word, targetWord: Word)"})," soll den\nEintr\xe4gen des W\xf6rterbuches (",(0,i.jsx)(r.code,{children:"entries"}),") die eingehenden W\xf6rter als Eintrag\nhinzuf\xfcgen. F\xfcr den Fall, dass die Sprache des ersten eingehenden Wortes nicht\nder Quellsprache (",(0,i.jsx)(r.code,{children:"sourceLanguage"}),") entspricht, oder die Sprache des zweiten\neingehenden Wortes nicht der Zielsprache (",(0,i.jsx)(r.code,{children:"targetLanguage"}),") entspricht, soll\ndie Ausnahme ",(0,i.jsx)(r.code,{children:"InvalidLanguageException"})," ausgel\xf6st werden"]}),"\n",(0,i.jsxs)(r.li,{children:["Die Methode ",(0,i.jsx)(r.code,{children:"void importEntries(file: File)"})," soll den Eintr\xe4gen des\nW\xf6rterbuches (",(0,i.jsx)(r.code,{children:"entries"}),") die W\xf6rter der eingehenden Datei als Eintr\xe4ge\nhinzuf\xfcgen. Die Ausnahme ",(0,i.jsx)(r.code,{children:"FileNotFoundException"})," soll dabei weitergeleitet\nwerden"]}),"\n",(0,i.jsxs)(r.li,{children:["Die Methode ",(0,i.jsx)(r.code,{children:"Optional getTranslation(word: String)"})," soll die\n\xdcbersetzung zur eingehenden Zeichenkette als Optional zur\xfcckgeben"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"beispielhafter-aufbau-der-w\xf6rterdatei",children:"Beispielhafter Aufbau der W\xf6rterdatei"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"DE;Haus;EN;House\nDE;Maus;EN;Mouse\nDE;Baum;EN;Tree\n"})})]})}function p(e={}){const{wrapper:r}={...(0,a.a)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},11151:(e,r,n)=>{n.d(r,{Z:()=>o,a:()=>t});var i=n(67294);const a={},s=i.createContext(a);function t(e){const r=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:t(e.components),i.createElement(s.Provider,{value:r},e.children)}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[9302],{99376:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>d,contentTitle:()=>t,default:()=>p,frontMatter:()=>s,metadata:()=>o,toc:()=>l});var i=n(85893),a=n(11151);const s={title:"W\xf6rterbuch",description:"",tags:["interfaces","comparators","exceptions","records","maps","optionals","io-streams"]},t=void 0,o={id:"exam-exercises/exam-exercises-java2/dictionary",title:"W\xf6rterbuch",description:"",source:"@site/docs/exam-exercises/exam-exercises-java2/dictionary.md",sourceDirName:"exam-exercises/exam-exercises-java2",slug:"/exam-exercises/exam-exercises-java2/dictionary",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/dictionary",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exam-exercises/exam-exercises-java2/dictionary.md",tags:[{label:"interfaces",permalink:"/java-docs/pr-preview/pr-75/tags/interfaces"},{label:"comparators",permalink:"/java-docs/pr-preview/pr-75/tags/comparators"},{label:"exceptions",permalink:"/java-docs/pr-preview/pr-75/tags/exceptions"},{label:"records",permalink:"/java-docs/pr-preview/pr-75/tags/records"},{label:"maps",permalink:"/java-docs/pr-preview/pr-75/tags/maps"},{label:"optionals",permalink:"/java-docs/pr-preview/pr-75/tags/optionals"},{label:"io-streams",permalink:"/java-docs/pr-preview/pr-75/tags/io-streams"}],version:"current",frontMatter:{title:"W\xf6rterbuch",description:"",tags:["interfaces","comparators","exceptions","records","maps","optionals","io-streams"]},sidebar:"examExercisesSidebar",previous:{title:"Tante-Emma-Laden",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/corner-shop"},next:{title:"Personalverwaltung",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/human-resources"}},d={},l=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Allgemeine Hinweise",id:"allgemeine-hinweise",level:2},{value:"Hinweis zur Klasse Word",id:"hinweis-zur-klasse-word",level:2},{value:"Hinweise zur Klasse Dictionary",id:"hinweise-zur-klasse-dictionary",level:2},{value:"Beispielhafter Aufbau der W\xf6rterdatei",id:"beispielhafter-aufbau-der-w\xf6rterdatei",level:2}];function c(e){const r={code:"code",h2:"h2",li:"li",mermaid:"mermaid",p:"p",pre:"pre",ul:"ul",...(0,a.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.p,{children:"Setze das abgebildete Klassendiagramm vollst\xe4ndig um. Erstelle zum Testen eine\nausf\xfchrbare Klasse und/oder eine Testklasse."}),"\n",(0,i.jsx)(r.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,i.jsx)(r.mermaid,{value:"classDiagram\n Comparable~Word~ <|.. Word\n Word o-- Language\n Dictionary o-- Word\n Dictionary o-- Language\n\n class Word {\n <>\n -value String\n -language Language\n +compareTo(other Word) int\n }\n\n class Comparable~Word~ {\n <>\n +compareTo(o Word) int\n }\n\n class Language {\n <>\n DE = DE, Deutsch\n EN = EN, Englisch\n -code String\n -description String\n }\n\n class Dictionary {\n <>\n -sourceLanguage Language\n -targetLanguage Language\n -entries Map~Word‚ Word~\n +addEntry(sourceWord Word, targetWord Word) void\n +importEntries(file File) void\n +getTranslation(word String) Optional~String~\n }"}),"\n",(0,i.jsx)(r.h2,{id:"allgemeine-hinweise",children:"Allgemeine Hinweise"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsx)(r.li,{children:"Aus Gr\xfcnden der \xdcbersicht werden im Klassendiagramm keine Getter und\nObject-Methoden dargestellt"}),"\n",(0,i.jsx)(r.li,{children:"So nicht anders angegeben, sollen Konstruktoren, Setter, Getter sowie die\nObject-Methoden wie gewohnt implementiert werden"}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"hinweis-zur-klasse-word",children:"Hinweis zur Klasse Word"}),"\n",(0,i.jsxs)(r.p,{children:["Die Methode ",(0,i.jsx)(r.code,{children:"int compareTo(other: Word)"})," soll so implementiert werden, dass\ndamit W\xf6rter aufsteigend nach ihrem Wert sortiert werden k\xf6nnen."]}),"\n",(0,i.jsx)(r.h2,{id:"hinweise-zur-klasse-dictionary",children:"Hinweise zur Klasse Dictionary"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:["Die Methode ",(0,i.jsx)(r.code,{children:"void addEntry(sourceWord: Word, targetWord: Word)"})," soll den\nEintr\xe4gen des W\xf6rterbuches (",(0,i.jsx)(r.code,{children:"entries"}),") die eingehenden W\xf6rter als Eintrag\nhinzuf\xfcgen. F\xfcr den Fall, dass die Sprache des ersten eingehenden Wortes nicht\nder Quellsprache (",(0,i.jsx)(r.code,{children:"sourceLanguage"}),") entspricht, oder die Sprache des zweiten\neingehenden Wortes nicht der Zielsprache (",(0,i.jsx)(r.code,{children:"targetLanguage"}),") entspricht, soll\ndie Ausnahme ",(0,i.jsx)(r.code,{children:"InvalidLanguageException"})," ausgel\xf6st werden"]}),"\n",(0,i.jsxs)(r.li,{children:["Die Methode ",(0,i.jsx)(r.code,{children:"void importEntries(file: File)"})," soll den Eintr\xe4gen des\nW\xf6rterbuches (",(0,i.jsx)(r.code,{children:"entries"}),") die W\xf6rter der eingehenden Datei als Eintr\xe4ge\nhinzuf\xfcgen. Die Ausnahme ",(0,i.jsx)(r.code,{children:"FileNotFoundException"})," soll dabei weitergeleitet\nwerden"]}),"\n",(0,i.jsxs)(r.li,{children:["Die Methode ",(0,i.jsx)(r.code,{children:"Optional getTranslation(word: String)"})," soll die\n\xdcbersetzung zur eingehenden Zeichenkette als Optional zur\xfcckgeben"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"beispielhafter-aufbau-der-w\xf6rterdatei",children:"Beispielhafter Aufbau der W\xf6rterdatei"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"DE;Haus;EN;House\nDE;Maus;EN;Mouse\nDE;Baum;EN;Tree\n"})})]})}function p(e={}){const{wrapper:r}={...(0,a.a)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},11151:(e,r,n)=>{n.d(r,{Z:()=>o,a:()=>t});var i=n(67294);const a={},s=i.createContext(a);function t(e){const r=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:t(e.components),i.createElement(s.Provider,{value:r},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/a91640a8.4d9f173b.js b/pr-preview/pr-75/assets/js/a91640a8.4d9f173b.js
deleted file mode 100644
index bc4859a7df..0000000000
--- a/pr-preview/pr-75/assets/js/a91640a8.4d9f173b.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[2219],{37537:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>t,contentTitle:()=>o,default:()=>m,frontMatter:()=>a,metadata:()=>l,toc:()=>d});var r=s(85893),i=s(11151);const a={title:"Personalverwaltung",description:"",tags:["exceptions","records","maps"]},o=void 0,l={id:"exam-exercises/exam-exercises-java2/human-resources",title:"Personalverwaltung",description:"",source:"@site/docs/exam-exercises/exam-exercises-java2/human-resources.md",sourceDirName:"exam-exercises/exam-exercises-java2",slug:"/exam-exercises/exam-exercises-java2/human-resources",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/human-resources",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exam-exercises/exam-exercises-java2/human-resources.md",tags:[{label:"exceptions",permalink:"/java-docs/pr-preview/pr-75/tags/exceptions"},{label:"records",permalink:"/java-docs/pr-preview/pr-75/tags/records"},{label:"maps",permalink:"/java-docs/pr-preview/pr-75/tags/maps"}],version:"current",frontMatter:{title:"Personalverwaltung",description:"",tags:["exceptions","records","maps"]},sidebar:"examExercisesSidebar",previous:{title:"W\xf6rterbuch",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/dictionary"},next:{title:"Stellenangebot",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/job-offer"}},t={},d=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Allgemeine Hinweise",id:"allgemeine-hinweise",level:2},{value:"Hinweise zur Klasse HumanResources",id:"hinweise-zur-klasse-humanresources",level:2}];function c(e){const n={code:"code",h2:"h2",li:"li",mermaid:"mermaid",p:"p",ul:"ul",...(0,i.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Setze das abgebildete Klassendiagramm vollst\xe4ndig um. Erstelle zum Testen eine\nausf\xfchrbare Klasse und/oder eine Testklasse."}),"\n",(0,r.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n HumanResources o-- Person\n HumanResources o-- TelephoneNumber\n\n class HumanResources {\n <>\n +telephoneBook Map~TelephoneNumber, Person~\n +staff List~Person~\n +addTelephoneNumber(telephoneNumber TelephoneNumber, person Person) void\n +addStaff(person Person) void\n +getTelephoneNumbersByPersonId(id int) List~TelephoneNumber~\n }\n\n class Person {\n <>\n -id int\n -name String\n }\n\n class TelephoneNumber {\n <>\n -digits int[*]\n }"}),"\n",(0,r.jsx)(n.h2,{id:"allgemeine-hinweise",children:"Allgemeine Hinweise"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Aus Gr\xfcnden der \xdcbersicht werden im Klassendiagramm keine Getter und\nObject-Methoden dargestellt"}),"\n",(0,r.jsx)(n.li,{children:"So nicht anders angegeben, sollen Konstruktoren, Setter, Getter sowie die\nObject-Methoden wie gewohnt implementiert werden"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"hinweise-zur-klasse-humanresources",children:"Hinweise zur Klasse HumanResources"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Die Methode\n",(0,r.jsx)(n.code,{children:"void addTelephoneNumber(telephoneNumber: TelephoneNumber, person: Person)"}),"\nsoll dem Telefonbuch (",(0,r.jsx)(n.code,{children:"telephoneBook"}),") die eingehende Telefonnummer als\nSchl\xfcssel sowie die eingehende Person als Wert hinzuf\xfcgen"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void addStaff(person: Person)"})," soll der Personalliste (",(0,r.jsx)(n.code,{children:"staff"}),")\ndie eingehende Person hinzuf\xfcgen. F\xfcr den Fall, dass diese Person bereits in\nder Personalliste vorhanden ist, soll die Ausnahme ",(0,r.jsx)(n.code,{children:"DuplicateException"}),"\nausgel\xf6st werden"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"List getTelephoneNumbersByPersonId(id: int)"}),"\nsoll alle Telefonnummern zur eingehenden Personennummer zur\xfcckgeben"]}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},11151:(e,n,s)=>{s.d(n,{Z:()=>l,a:()=>o});var r=s(67294);const i={},a=r.createContext(i);function o(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/a91640a8.6ab735a0.js b/pr-preview/pr-75/assets/js/a91640a8.6ab735a0.js
new file mode 100644
index 0000000000..b1a1ec1896
--- /dev/null
+++ b/pr-preview/pr-75/assets/js/a91640a8.6ab735a0.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[2219],{37537:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>t,contentTitle:()=>o,default:()=>m,frontMatter:()=>a,metadata:()=>l,toc:()=>d});var r=s(85893),i=s(11151);const a={title:"Personalverwaltung",description:"",tags:["exceptions","records","maps"]},o=void 0,l={id:"exam-exercises/exam-exercises-java2/human-resources",title:"Personalverwaltung",description:"",source:"@site/docs/exam-exercises/exam-exercises-java2/human-resources.md",sourceDirName:"exam-exercises/exam-exercises-java2",slug:"/exam-exercises/exam-exercises-java2/human-resources",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/human-resources",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exam-exercises/exam-exercises-java2/human-resources.md",tags:[{label:"exceptions",permalink:"/java-docs/pr-preview/pr-75/tags/exceptions"},{label:"records",permalink:"/java-docs/pr-preview/pr-75/tags/records"},{label:"maps",permalink:"/java-docs/pr-preview/pr-75/tags/maps"}],version:"current",frontMatter:{title:"Personalverwaltung",description:"",tags:["exceptions","records","maps"]},sidebar:"examExercisesSidebar",previous:{title:"W\xf6rterbuch",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/dictionary"},next:{title:"Stellenangebot",permalink:"/java-docs/pr-preview/pr-75/exam-exercises/exam-exercises-java2/job-offer"}},t={},d=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Allgemeine Hinweise",id:"allgemeine-hinweise",level:2},{value:"Hinweise zur Klasse HumanResources",id:"hinweise-zur-klasse-humanresources",level:2}];function c(e){const n={code:"code",h2:"h2",li:"li",mermaid:"mermaid",p:"p",ul:"ul",...(0,i.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Setze das abgebildete Klassendiagramm vollst\xe4ndig um. Erstelle zum Testen eine\nausf\xfchrbare Klasse und/oder eine Testklasse."}),"\n",(0,r.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,r.jsx)(n.mermaid,{value:"classDiagram\n HumanResources o-- Person\n HumanResources o-- TelephoneNumber\n\n class HumanResources {\n <>\n +telephoneBook Map~TelephoneNumber‚ Person~\n +staff List~Person~\n +addTelephoneNumber(telephoneNumber TelephoneNumber, person Person) void\n +addStaff(person Person) void\n +getTelephoneNumbersByPersonId(id int) List~TelephoneNumber~\n }\n\n class Person {\n <>\n -id int\n -name String\n }\n\n class TelephoneNumber {\n <>\n -digits int[*]\n }"}),"\n",(0,r.jsx)(n.h2,{id:"allgemeine-hinweise",children:"Allgemeine Hinweise"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Aus Gr\xfcnden der \xdcbersicht werden im Klassendiagramm keine Getter und\nObject-Methoden dargestellt"}),"\n",(0,r.jsx)(n.li,{children:"So nicht anders angegeben, sollen Konstruktoren, Setter, Getter sowie die\nObject-Methoden wie gewohnt implementiert werden"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"hinweise-zur-klasse-humanresources",children:"Hinweise zur Klasse HumanResources"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Die Methode\n",(0,r.jsx)(n.code,{children:"void addTelephoneNumber(telephoneNumber: TelephoneNumber, person: Person)"}),"\nsoll dem Telefonbuch (",(0,r.jsx)(n.code,{children:"telephoneBook"}),") die eingehende Telefonnummer als\nSchl\xfcssel sowie die eingehende Person als Wert hinzuf\xfcgen"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"void addStaff(person: Person)"})," soll der Personalliste (",(0,r.jsx)(n.code,{children:"staff"}),")\ndie eingehende Person hinzuf\xfcgen. F\xfcr den Fall, dass diese Person bereits in\nder Personalliste vorhanden ist, soll die Ausnahme ",(0,r.jsx)(n.code,{children:"DuplicateException"}),"\nausgel\xf6st werden"]}),"\n",(0,r.jsxs)(n.li,{children:["Die Methode ",(0,r.jsx)(n.code,{children:"List getTelephoneNumbersByPersonId(id: int)"}),"\nsoll alle Telefonnummern zur eingehenden Personennummer zur\xfcckgeben"]}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},11151:(e,n,s)=>{s.d(n,{Z:()=>l,a:()=>o});var r=s(67294);const i={},a=r.createContext(i);function o(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/pr-preview/pr-75/assets/js/b8878fef.5b839dca.js b/pr-preview/pr-75/assets/js/b8878fef.5b839dca.js
new file mode 100644
index 0000000000..48ba7eaf2d
--- /dev/null
+++ b/pr-preview/pr-75/assets/js/b8878fef.5b839dca.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkjava_docs=self.webpackChunkjava_docs||[]).push([[4007],{82610:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>u,contentTitle:()=>i,default:()=>h,frontMatter:()=>t,metadata:()=>o,toc:()=>c});var l=s(85893),r=s(11151),a=s(85521);const t={title:"JavaStreamAPI01",description:""},i=void 0,o={id:"exercises/java-stream-api/java-stream-api01",title:"JavaStreamAPI01",description:"",source:"@site/docs/exercises/java-stream-api/java-stream-api01.mdx",sourceDirName:"exercises/java-stream-api",slug:"/exercises/java-stream-api/java-stream-api01",permalink:"/java-docs/pr-preview/pr-75/exercises/java-stream-api/java-stream-api01",draft:!1,unlisted:!1,editUrl:"https://github.com/jappuccini/java-docs/tree/main/docs/exercises/java-stream-api/java-stream-api01.mdx",tags:[],version:"current",frontMatter:{title:"JavaStreamAPI01",description:""},sidebar:"exercisesSidebar",previous:{title:"Die Java Stream API",permalink:"/java-docs/pr-preview/pr-75/exercises/java-stream-api/"},next:{title:"JavaStreamAPI02",permalink:"/java-docs/pr-preview/pr-75/exercises/java-stream-api/java-stream-api02"}},u={},c=[{value:"Klassendiagramm",id:"klassendiagramm",level:2},{value:"Hinweis zur Klasse Console",id:"hinweis-zur-klasse-console",level:2},{value:"Hinweise zur Klasse Queries",id:"hinweise-zur-klasse-queries",level:2}];function d(e){const n={code:"code",em:"em",h2:"h2",li:"li",mermaid:"mermaid",p:"p",ul:"ul",...(0,r.a)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Erstelle die Klasse ",(0,l.jsx)(n.code,{children:"Queries"})," anhand des abgebildeten Klassendiagramms"]}),"\n",(0,l.jsx)(n.li,{children:"Erstelle eine ausf\xfchrbare Klasse, welche alle erstellten Abfragen ausf\xfchrt und\ndie Ergebnisse auf der Konsole ausgibt"}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"klassendiagramm",children:"Klassendiagramm"}),"\n",(0,l.jsx)(n.mermaid,{value:"classDiagram\n Console o-- Maker\n Queries o-- Console\n\n class Maker {\n <>\n MICROSOFT\n NINTENDO\n SONY\n }\n\n class Console {\n <>\n -title String\n -maker Maker\n -lifespan int\n -soldUnitsInMillions double\n }\n\n class DataProvider {\n +getConsoles()$ List~Console~\n }\n\n class Queries {\n <>\n -consoles List~Console~\n +getAllCurrentConsoleNames() List~String~\n +getAllConsolesSortedByLifespan() List~Console~\n +isAnyConsoleWithMoreThan150MillionSoldUnits() boolean\n +isAllConsolesWithMoreThan50MillionSoldUnits() boolean\n +getNumberOfConsolesFromNintendo() long\n +getSoldUnitsInMillionsPerYearFromAllOutdatedConsoles() List~String~\n +getAverageSoldUnitsInMillionsPerYearFromAllOutdatedConsoles() OptionalDouble\n +getAllConsolesByMaker() Map~Maker‚ List~Console~~\n +getTotalSoldUnitsInMillionsPerMaker() Map~Maker‚ Double~\n }"}),"\n",(0,l.jsx)(n.h2,{id:"hinweis-zur-klasse-console",children:"Hinweis zur Klasse Console"}),"\n",(0,l.jsxs)(n.p,{children:["Konsolen, die aktuell noch verkauft werden, besitzen bei der Lebensspanne den\nWert ",(0,l.jsx)(n.code,{children:"-1"})," (Stand: 14.06.2023)"]}),"\n",(0,l.jsx)(n.h2,{id:"hinweise-zur-klasse-queries",children:"Hinweise zur Klasse Queries"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Die Methode ",(0,l.jsx)(n.code,{children:"List getAllCurrentConsoleNames()"})," soll die Namen aller\nKonsolen, die aktuell noch verkauft werden zur\xfcckgeben (",(0,l.jsx)(n.em,{children:"Nintendo Switch,\nPlayStation 4, XBox One"}),")"]}),"\n",(0,l.jsxs)(n.li,{children:["Die Methode ",(0,l.jsx)(n.code,{children:"List getAllConsolesSortedByLifespan()"})," soll\nalle Konsolen absteigend sortiert nach der Lebensspanne zur\xfcckgeben\n(",(0,l.jsx)(n.em,{children:"VideoGameConsole[title=Nintendo Wii, maker=NINTENDO, lifespan=13,\nsoldUnits=101.63]"}),",...)"]}),"\n",(0,l.jsxs)(n.li,{children:["Die Methode ",(0,l.jsx)(n.code,{children:"boolean isAnyConsoleWithMoreThan150MillionSoldUnits()"})," soll die\nAntwort auf die Frage, ob es eine Konsole mit mehr als 150 Millionen\nverkauften Einheiten gibt, zur\xfcckgeben (",(0,l.jsx)(n.em,{children:"true"}),")"]}),"\n",(0,l.jsxs)(n.li,{children:["Die Methode ",(0,l.jsx)(n.code,{children:"boolean isAllConsolesWithMoreThan50MillionSoldUnits()"})," soll die\nAntwort auf die Frage, ob von allen Konsolen mehr als 50 Millionen Einheiten\nverkauft wurden, zur\xfcckgeben (",(0,l.jsx)(n.em,{children:"false"}),")"]}),"\n",(0,l.jsxs)(n.li,{children:["Die Methode ",(0,l.jsx)(n.code,{children:"long getNumberOfConsolesFromNintendo()"})," soll die Anzahl der\nKonsolen von Nintendo zur\xfcckgeben (",(0,l.jsx)(n.em,{children:"8"}),")"]}),"\n",(0,l.jsxs)(n.li,{children:["Die Methode\n",(0,l.jsx)(n.code,{children:"List getSoldUnitsInMillionsPerYearFromAllOutdatedConsoles()"})," soll die\nNamen aller Konsolen, die nicht mehr verkauft werden sowie die Anzahl\nverkaufter Einheiten pro Jahr in Millionen zur\xfcckgeben (",(0,l.jsx)(n.em,{children:"PlayStation 2\n(13.225)"}),",...)"]}),"\n",(0,l.jsxs)(n.li,{children:["Die Methode\n",(0,l.jsx)(n.code,{children:"OptionalDouble getAverageSoldUnitsInMillionsPerYearFromAllOutdatedConsoles()"}),"\nsoll den Durchschnitt verkaufter Einheiten pro Jahr in Millionen aller\nKonsolen, die nicht mehr verkauft werden zur\xfcckgeben (",(0,l.jsx)(n.em,{children:"9.900365412365412"}),")"]}),"\n",(0,l.jsxs)(n.li,{children:["Die Methode ",(0,l.jsx)(n.code,{children:"Map> getAllConsolesByMaker()"})," soll\nalle Konsolen gruppiert nach den Herstellern zur\xfcckgeben (",(0,l.jsx)(n.em,{children:"MICROSOFT:\n[VideoGameConsole[title=XBox 360, maker=MICROSOFT, lifespan=12,\nsoldUnitsInMillions=85.81]"}),",...],...)"]}),"\n",(0,l.jsxs)(n.li,{children:["Die Methode ",(0,l.jsx)(n.code,{children:"Map