From 9f2c405b98b8f701c4d77090b8b58f659d630b4a Mon Sep 17 00:00:00 2001 From: "Dr. Martin Goik" <goik@hdm-stuttgart.de> Date: Fri, 19 Jul 2019 22:34:00 +0200 Subject: [PATCH] Moving exam to lecture notes appendix --- .../Sd1/Exam/2018/Summer}/.gitignore | 0 .../Sd1/Exam/2018/Summer/exam.xml | 87 ++++++------- .../Sd1/Exam/2018/Winter}/.gitignore | 0 .../Sd1/Exam/2018/Winter/exam.xml | 95 +++++++------- .../Sd1/Exam/2019/Summer}/change.svg | 0 .../Doc => Doc/Sd1/Exam/2019/Summer}/exam.xml | 116 ++++++++++++------ Doc/Sd1/appendix.xml | 13 ++ .../CustomLayer/Klausur/docbook2klausur.xsl | 10 +- 8 files changed, 178 insertions(+), 143 deletions(-) rename {Klausuren/Sd1/2018summer/Solve/Doc => Doc/Sd1/Exam/2018/Summer}/.gitignore (100%) rename Klausuren/Sd1/2018summer/Solve/Doc/klausur.xml => Doc/Sd1/Exam/2018/Summer/exam.xml (89%) rename {Klausuren/Sd1/2018winter/Solve/Doc => Doc/Sd1/Exam/2018/Winter}/.gitignore (100%) rename Klausuren/Sd1/2018winter/Solve/Doc/klausur.xml => Doc/Sd1/Exam/2018/Winter/exam.xml (90%) rename {Klausuren/Sd1/2019summer/Solve/Doc => Doc/Sd1/Exam/2019/Summer}/change.svg (100%) rename {Klausuren/Sd1/2019summer/Solve/Doc => Doc/Sd1/Exam/2019/Summer}/exam.xml (75%) diff --git a/Klausuren/Sd1/2018summer/Solve/Doc/.gitignore b/Doc/Sd1/Exam/2018/Summer/.gitignore similarity index 100% rename from Klausuren/Sd1/2018summer/Solve/Doc/.gitignore rename to Doc/Sd1/Exam/2018/Summer/.gitignore diff --git a/Klausuren/Sd1/2018summer/Solve/Doc/klausur.xml b/Doc/Sd1/Exam/2018/Summer/exam.xml similarity index 89% rename from Klausuren/Sd1/2018summer/Solve/Doc/klausur.xml rename to Doc/Sd1/Exam/2018/Summer/exam.xml index a9eac035f..a6854a266 100644 --- a/Klausuren/Sd1/2018summer/Solve/Doc/klausur.xml +++ b/Doc/Sd1/Exam/2018/Summer/exam.xml @@ -1,32 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> -<book version="5.0" xml:id="klausur_SoSe_2018" xml:lang="de" - xmlns="http://docbook.org/ns/docbook" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes" - xmlns:xi="http://www.w3.org/2001/XInclude" - xmlns:trans="http://docbook.org/ns/transclusion" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns:m="http://www.w3.org/1998/Math/MathML" - xmlns:html="http://www.w3.org/1999/xhtml" - xmlns:db="http://docbook.org/ns/docbook"> - <!-- --> - - <info> - <title/> - - <author> - <personname/> - </author> - - <pubdate/> - </info> - - <chapter xml:id="task1"> +<section version="5.1" xml:id="sd1_exam_2018_summer" xml:lang="de" + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:trans="http://docbook.org/ns/transclusion" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:m="http://www.w3.org/1998/Math/MathML" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:db="http://docbook.org/ns/docbook"> + <title>SE1 Klausur Sommer 2018</title> + + <section xml:id="sd1_exam_2018_summer_task1"> <title>Klassenmethoden</title> - <!-- Hier gemeinsames zip Archiv hochladen, auch von anderen Aufgaben. --> - - <section xml:id="aufgabe1_prepare"> + <section xml:id="sd1_exam_2018_summer_aufgabe1_prepare"> <title>Vorbereitung</title> <para>Entpacken Sie das oben sichtbare Archiv @@ -35,7 +23,7 @@ Projekt in IntelliJ.</para> </section> - <section xml:id="aufgabe1_descr"> + <section xml:id="sd1_exam_2018_summer_aufgabe1_descr"> <title>Beschreibung</title> <para>Implementierung vorbereiteter Methoden gemäß @@ -44,7 +32,7 @@ Implementierung Teilpunkte.</para> </section> - <section xml:id="aufgabe1_task"> + <section xml:id="sd1_exam_2018_summer_aufgabe1_task"> <title>Aufgabe</title> <para>Vervollständigen Sie die Implementierung aller Methoden aus @@ -79,7 +67,7 @@ </informaltable> </section> - <section xml:id="aufgabe1_commonHints"> + <section xml:id="sd1_exam_2018_summer_aufgabe1_commonHints"> <title>Allgemeine Hinweise</title> <itemizedlist> @@ -135,7 +123,8 @@ Generating /home/xy123/Downloads/Exam/Solve/target/site/apidocs/help-doc.html... </itemizedlist> </section> - <section version="5.1" xml:id="uploadFirst" xml:lang="de"> + <section version="5.1" xml:id="sd1_exam_2018_summer_uploadFirst" + xml:lang="de"> <title>Hochladen Ihrer Lösung in das Klausursystem</title> <para>Exportieren Sie Ihr Projekt über den Menüpunkt »File« --> @@ -190,12 +179,12 @@ Generating /home/xy123/Downloads/Exam/Solve/target/site/apidocs/help-doc.html... </itemizedlist> </caution> </section> - </chapter> + </section> - <chapter xml:id="task2"> + <section xml:id="sd1_exam_2018_summer_task2"> <title>Artikel</title> - <section xml:id="aufgabe2_prepare"> + <section xml:id="sd1_exam_2018_summer_aufgabe2_prepare"> <title>Vorbereitung</title> <para>Falls Sie die erste Aufgabe bearbeitet haben, arbeiten Sie einfach @@ -204,7 +193,7 @@ Generating /home/xy123/Downloads/Exam/Solve/target/site/apidocs/help-doc.html... Hochladen in das <productname>Ilias</productname> System.</para> </section> - <section xml:id="aufgabe2_descr"> + <section xml:id="sd1_exam_2018_summer_aufgabe2_descr"> <title>Beschreibung</title> <para>Implementierung einer Klasse zur Darstellung von Artikeln. Das @@ -213,7 +202,7 @@ Generating /home/xy123/Downloads/Exam/Solve/target/site/apidocs/help-doc.html... als Ausgangspunkt für Ihre Implementierung.</para> </section> - <section xml:id="aufgabe2_task"> + <section xml:id="sd1_exam_2018_summer_aufgabe2_task"> <title>Aufgaben</title> <orderedlist> @@ -288,14 +277,16 @@ Ball / Fahrrad: false</screen></td> </tip> </section> - <section version="5.1" xml:id="uploadFollow" xml:lang="de"> + <section version="5.1" xml:id="sd1_exam_2018_summer_uploadFollow" + xml:lang="de"> <title>Hochladen Ihrer Lösung in das Klausursystem</title> <para>Laden Sie die Lösung dieser Aufgabe als gemeinsamen Projekt Export - mit der ersten Aufgabe <xref linkend="task1"/> gemäß den dortigen - Hinweisen hoch. Falls Sie die erste Aufgabe ebenfalls bearbeitet haben, - enthält Ihr <foreignphrase xml:lang="en">Upload</foreignphrase> die - Lösungen zu beiden Aufgaben.</para> + mit der ersten Aufgabe <xref linkend="sd1_exam_2018_summer_task1"/> + gemäß den dortigen Hinweisen hoch. Falls Sie die erste Aufgabe ebenfalls + bearbeitet haben, enthält Ihr <foreignphrase + xml:lang="en">Upload</foreignphrase> die Lösungen zu beiden + Aufgaben.</para> <para>Tragen Sie im Freitextfeld weiter unten genau einen der beiden Texte ein:</para> @@ -311,9 +302,9 @@ Ball / Fahrrad: false</screen></td> </listitem> </itemizedlist> </section> - </chapter> + </section> - <chapter xml:id="task3"> + <section xml:id="sd1_exam_2018_summer_task3"> <title>Primitive und Klassentypen</title> <para>Wir vergleichen die Werte zweier Instanzen der Klassen <classname @@ -369,9 +360,9 @@ System.out.println("Wertvergleich int mit long: " + xlink:href="https://docs.oracle.com/javase/10/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals()</methodname> Methode in Bezug auf Instanzen »fremder« Klassen implementiert? Was bewirken die Zuweisungen?</para> - </chapter> + </section> - <chapter xml:id="task4"> + <section xml:id="sd1_exam_2018_summer_task4"> <title>Ein Interface Problem</title> <para>Wir betrachten:</para> @@ -397,9 +388,9 @@ System.out.println("Wertvergleich int mit long: " + <para>Erläutern Sie die Ursache dieser Fehlermeldung. Welche Beziehung besteht zu <classname xlink:href="https://docs.oracle.com/javase/10/docs/api/java/lang/Object.html">java.lang.Object</classname>?</para> - </chapter> + </section> - <chapter xml:id="task5"> + <section xml:id="sd1_exam_2018_summer_task5"> <title>Farbwerte, <code language="java">byte</code> und <code language="java">int</code></title> @@ -450,5 +441,5 @@ static public byte[] int2rgb(final int farbwert) { <tip> <para>Betrachten Sie die zugrundliegenden Datentypen.</para> </tip> - </chapter> -</book> + </section> +</section> diff --git a/Klausuren/Sd1/2018winter/Solve/Doc/.gitignore b/Doc/Sd1/Exam/2018/Winter/.gitignore similarity index 100% rename from Klausuren/Sd1/2018winter/Solve/Doc/.gitignore rename to Doc/Sd1/Exam/2018/Winter/.gitignore diff --git a/Klausuren/Sd1/2018winter/Solve/Doc/klausur.xml b/Doc/Sd1/Exam/2018/Winter/exam.xml similarity index 90% rename from Klausuren/Sd1/2018winter/Solve/Doc/klausur.xml rename to Doc/Sd1/Exam/2018/Winter/exam.xml index b468bec5d..64f8bd54d 100644 --- a/Klausuren/Sd1/2018winter/Solve/Doc/klausur.xml +++ b/Doc/Sd1/Exam/2018/Winter/exam.xml @@ -1,32 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> -<book version="5.0" xml:id="klausur_SoSe_2018" xml:lang="de" - xmlns="http://docbook.org/ns/docbook" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes" - xmlns:xi="http://www.w3.org/2001/XInclude" - xmlns:trans="http://docbook.org/ns/transclusion" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns:m="http://www.w3.org/1998/Math/MathML" - xmlns:html="http://www.w3.org/1999/xhtml" - xmlns:db="http://docbook.org/ns/docbook"> - <!-- --> - - <info> - <title>Klausur Winter 2018/19</title> - - <author> - <personname/> - </author> - - <pubdate/> - </info> - - <chapter xml:id="task1"> +<section version="5.1" xml:id="sd1_exam_2018_winter" xml:lang="de" + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:trans="http://docbook.org/ns/transclusion" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:m="http://www.w3.org/1998/Math/MathML" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:db="http://docbook.org/ns/docbook"> + <title>SE1 Klausur Winter 2018</title> + + <section xml:id="sd1_exam_2018_winter_task1"> <title>Klassenmethoden</title> - <!-- Hier gemeinsames zip Archiv hochladen, auch von anderen Aufgaben. --> - - <section xml:id="aufgabe1_prepare"> + <section xml:id="sd1_exam_2018_winter_aufgabe1_prepare"> <title>Vorbereitung</title> <para>Entpacken Sie das oben sichtbare Archiv @@ -35,7 +23,7 @@ Projekt in IntelliJ.</para> </section> - <section xml:id="aufgabe1_descr"> + <section xml:id="sd1_exam_2018_winter_aufgabe1_descr"> <title>Beschreibung</title> <para>Implementierung vorbereiteter Methoden gemäß @@ -44,7 +32,7 @@ Implementierung Teilpunkte.</para> </section> - <section xml:id="aufgabe1_task"> + <section xml:id="sd1_exam_2018_winter_aufgabe1_task"> <title>Aufgabe</title> <para>Vervollständigen Sie die Implementierung aller Methoden der @@ -52,7 +40,7 @@ <package>de.hdm_stuttgart.mi.sd1.aufgabe1</package>.</para> </section> - <section xml:id="aufgabe1_commonHints"> + <section xml:id="sd1_exam_2018_winter_aufgabe1_commonHints"> <title>Allgemeine Hinweise</title> <itemizedlist> @@ -115,7 +103,8 @@ Generating /home/xy123/Downloads/Exam/Solve/target/site/apidocs/help-doc.html... </itemizedlist> </section> - <section version="5.1" xml:id="uploadFirst" xml:lang="de"> + <section version="5.1" xml:id="sd1_exam_2018_winter_uploadFirst" + xml:lang="de"> <title>Hochladen Ihrer Lösung in das Klausursystem</title> <para>Exportieren Sie Ihr Projekt über den Menüpunkt »File« --> @@ -168,12 +157,12 @@ Generating /home/xy123/Downloads/Exam/Solve/target/site/apidocs/help-doc.html... </itemizedlist> </caution> </section> - </chapter> + </section> - <chapter xml:id="task2"> + <section xml:id="sd1_exam_2018_winter_task2"> <title>Geographische Längen- und Breitenangaben</title> - <section xml:id="aufgabe2_prepare"> + <section xml:id="sd1_exam_2018_winter_aufgabe2_prepare"> <title>Vorbereitung</title> <para>Falls Sie die erste Aufgabe bearbeitet haben, arbeiten Sie einfach @@ -182,7 +171,7 @@ Generating /home/xy123/Downloads/Exam/Solve/target/site/apidocs/help-doc.html... Hochladen in das <productname>Ilias</productname> System.</para> </section> - <section xml:id="aufgabe2_descr"> + <section xml:id="sd1_exam_2018_winter_aufgabe2_descr"> <title>Beschreibung</title> <para>Implementierung einer Klasse zur Darstellung und Umrechnung von @@ -227,7 +216,7 @@ Generating /home/xy123/Downloads/Exam/Solve/target/site/apidocs/help-doc.html... 60}}\]</para> </section> - <section xml:id="aufgabe2_task"> + <section xml:id="sd1_exam_2018_winter_aufgabe2_task"> <title>Aufgaben</title> <para>Implementieren Sie die bereits vorhandene, bislang leere, Klasse @@ -273,10 +262,10 @@ final int grad = stuttartBreite.grad, die Methode <link xlink:href="https://docs.oracle.com/javase/10/docs/api/java/lang/Math.html#floor(double)">floor()</link> in Zusammenarbeit mit einer <foreignphrase - xml:id="en">cast</foreignphrase> Operation verwendet werden. Dies - erlaubt Ihnen die Umkehrung der Formel \(d = g + {m\over 60} + {s - \over {60 \times 60}}\) zur Zerlegung eines Dezimalgradwerts - <emphasis>d</emphasis> in Grad, Winkelminuten und + xml:id="sd1_exam_2018_winter_en">cast</foreignphrase> Operation + verwendet werden. Dies erlaubt Ihnen die Umkehrung der Formel \(d + = g + {m\over 60} + {s \over {60 \times 60}}\) zur Zerlegung eines + Dezimalgradwerts <emphasis>d</emphasis> in Grad, Winkelminuten und -sekunden.</para> </tip> </listitem> @@ -408,14 +397,16 @@ Standarddarstellung Breite Stuttgart:48° 46´ 56´´ Dezimaldarstellung Breite Stuttgart:48.782222</screen> </section> - <section version="5.1" xml:id="uploadFollow" xml:lang="de"> + <section version="5.1" xml:id="sd1_exam_2018_winter_uploadFollow" + xml:lang="de"> <title>Hochladen Ihrer Lösung in das Klausursystem</title> <para>Laden Sie die Lösung dieser Aufgabe als gemeinsamen Projekt Export - mit der ersten Aufgabe <xref linkend="task1"/> gemäß den dortigen - Hinweisen hoch. Falls Sie die erste Aufgabe ebenfalls bearbeitet haben, - enthält Ihr <foreignphrase xml:lang="en">Upload</foreignphrase> die - Lösungen zu beiden Aufgaben.</para> + mit der ersten Aufgabe <xref linkend="sd1_exam_2018_winter_task1"/> + gemäß den dortigen Hinweisen hoch. Falls Sie die erste Aufgabe ebenfalls + bearbeitet haben, enthält Ihr <foreignphrase + xml:lang="en">Upload</foreignphrase> die Lösungen zu beiden + Aufgaben.</para> <para>Tragen Sie im Freitextfeld weiter unten genau einen der beiden Texte ein:</para> @@ -431,9 +422,9 @@ Dezimaldarstellung Breite Stuttgart:48.782222</screen> </listitem> </itemizedlist> </section> - </chapter> + </section> - <chapter xml:id="task3"> + <section xml:id="sd1_exam_2018_winter_task3"> <title>Wahr oder falsch?</title> <para>Wahr oder falsch? Sie können sich ggf. Beispiele konstruieren und @@ -477,9 +468,9 @@ Dezimaldarstellung Breite Stuttgart:48.782222</screen> <para>Falsch</para> </listitem> </orderedlist> - </chapter> + </section> - <chapter xml:id="task4"> + <section xml:id="sd1_exam_2018_winter_task4"> <title>Zeitangaben und hashCode()</title> <para>Wir betrachten folgende Klasse zur Darstellung von Zeitdauern @@ -540,9 +531,9 @@ Dezimaldarstellung Breite Stuttgart:48.782222</screen> <screen xml:lang="en">However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.</screen> - </chapter> + </section> - <chapter xml:id="task5"> + <section xml:id="sd1_exam_2018_winter_task5"> <title>Vergleichen von <classname xlink:href="https://docs.oracle.com/javase/10/docs/api/java/lang/StringBuffer.html">StringBuffer</classname> Instanzen</title> @@ -608,5 +599,5 @@ System.out.println(a.equals(b));</programlisting></td> im Hinblick auf die Implementierung der <methodname xlink:href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)">equals()</methodname> Methode.</para> - </chapter> -</book> + </section> +</section> diff --git a/Klausuren/Sd1/2019summer/Solve/Doc/change.svg b/Doc/Sd1/Exam/2019/Summer/change.svg similarity index 100% rename from Klausuren/Sd1/2019summer/Solve/Doc/change.svg rename to Doc/Sd1/Exam/2019/Summer/change.svg diff --git a/Klausuren/Sd1/2019summer/Solve/Doc/exam.xml b/Doc/Sd1/Exam/2019/Summer/exam.xml similarity index 75% rename from Klausuren/Sd1/2019summer/Solve/Doc/exam.xml rename to Doc/Sd1/Exam/2019/Summer/exam.xml index 7585f5522..3f5f69dc9 100644 --- a/Klausuren/Sd1/2019summer/Solve/Doc/exam.xml +++ b/Doc/Sd1/Exam/2019/Summer/exam.xml @@ -1,22 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> -<book version="5.0" xml:id="klausur_SoSe_2018" - xmlns="http://docbook.org/ns/docbook" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes" - xmlns:xi="http://www.w3.org/2001/XInclude" - xmlns:trans="http://docbook.org/ns/transclusion" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns:m="http://www.w3.org/1998/Math/MathML" - xmlns:html="http://www.w3.org/1999/xhtml" - xmlns:db="http://docbook.org/ns/docbook"> - <info> - <title>SD1 examination summer 2019</title> - </info> - - <chapter xml:id="task1"> +<section version="5.1" xml:id="sd1_exam_2019_summer" + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:trans="http://docbook.org/ns/transclusion" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:m="http://www.w3.org/1998/Math/MathML" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:db="http://docbook.org/ns/docbook"> + <title>SD1 examination summer 2019</title> + + <section xml:id="sd1_exam_2019_summer_task1"> <title>Implementing tasks</title> - <section xml:id="task1_preparation"> + <section xml:id="sd1_exam_2019_summer_task1_preparation"> <title>Preparations</title> <para>Download and unzip the above file <filename>exam.zip</filename>. @@ -35,7 +33,7 @@ <option>javadoc:javadoc</option></link>.</para> </section> - <section xml:id="task1_description"> + <section xml:id="sd1_exam_2019_summer_task1_description"> <title>Description</title> <para>Your imported project contains:</para> @@ -57,7 +55,7 @@ </itemizedlist> </section> - <section xml:id="task1_tasks"> + <section xml:id="sd1_exam_2019_summer_task1_tasks"> <title>Tasks</title> <para>Complete the implementation of classes and methods in package @@ -86,7 +84,7 @@ </informaltable> </section> - <section xml:id="task1_hints"> + <section xml:id="sd1_exam_2019_summer_task1_hints"> <title>Hints</title> <itemizedlist> @@ -122,7 +120,7 @@ </itemizedlist> </section> - <section version="5.1" xml:id="uploadFirst"> + <section version="5.1" xml:id="sd1_exam_2019_summer_uploadFirst"> <title>Project upload</title> <para>Export your project by hitting »File« --> »Export to Zip File« @@ -153,7 +151,7 @@ </itemizedlist> </section> - <section xml:id="examCaveats"> + <section xml:id="sd1_exam_2019_summer_examCaveats"> <title>Caveats</title> <itemizedlist> @@ -168,12 +166,12 @@ </listitem> </itemizedlist> </section> - </chapter> + </section> - <chapter xml:id="task2"> + <section xml:id="sd1_exam_2019_summer_task2"> <title>Handling change money</title> - <section xml:id="task2_preparation"> + <section xml:id="sd1_exam_2019_summer_task2_preparation"> <title>Preparation</title> <para>If you already worked on the first task just continue implementing @@ -183,7 +181,7 @@ instructions.</para> </section> - <section xml:id="task2_descr"> + <section xml:id="sd1_exam_2019_summer_task2_descr"> <title>Description</title> <para>This task is about handling change money. You may think of a @@ -197,7 +195,7 @@ </mediaobject> </section> - <section xml:id="task2_tasks"> + <section xml:id="sd1_exam_2019_summer_task2_tasks"> <title>Tasks</title> <para>Implement all dummy methods in class @@ -208,7 +206,7 @@ <package>de.hdm_stuttgart.mi.sd1.test.task2</package>.<classname>Test_ChangeAmount</classname>.</para> </section> - <section xml:id="task2_upload"> + <section xml:id="sd1_exam_2019_summer_task2_upload"> <title>Solution upload</title> <para>Follow your first task's project export and upload instructions. @@ -229,9 +227,9 @@ </listitem> </itemizedlist> </section> - </chapter> + </section> - <chapter xml:id="task3"> + <section xml:id="sd1_exam_2019_summer_task3"> <title>Logical expression</title> <para>Consider the following method:</para> @@ -255,9 +253,18 @@ <para>Write down only the <code language="java">return ... ;</code> statement using the text field below.</para> - </chapter> - <chapter xml:id="task4"> + <section xml:id="sd1_exam_2019_summer_solve3"> + <title>Solution</title> + + <para>Free access is being granted if your age is less than or equal to + 12 years or on Wednesdays:</para> + + <programlisting language="java">return age <= 12 || DayOfWeek.WEDNESDAY == day;</programlisting> + </section> + </section> + + <section xml:id="sd1_exam_2019_summer_task4"> <title>Device states</title> <para>We consider an <code language="java">enum</code> describing device @@ -307,9 +314,25 @@ Hello!</screen></td> <methodname>main(...)</methodname> method?</para> </listitem> </itemizedlist> - </chapter> - <chapter xml:id="task5"> + <section xml:id="sd1_exam_2019_summer_solve4"> + <title>Solution</title> + + <para><code language="java">ON</code>, <code language="java">OFF</code> + and <code language="java">STANDBY</code> are static references to + <classname>Device</classname> instances being created inside our <code + language="java">enum</code> <classname>Device</classname> class. This + happens the way being described in <xref + linkend="sd1_fig_enumPrivateConstructor"/>.</para> + + <para>Thus our private constructor in question is being called from + within <code language="java">enum</code> <classname>Device</classname> + class scope and therefore not being limited by access + restrictions.</para> + </section> + </section> + + <section xml:id="sd1_exam_2019_summer_task5"> <title>Missing exception warning</title> <para>According to the API documentation the <link @@ -351,7 +374,6 @@ Hello!</screen></td> role="red"> 'java.nio.file.FileAlreadyExistsException' </emphasis> <emphasis role="red"> is never thrown in the method</emphasis> */ { - try { Files.copy(Paths.get(sourceFileName), Paths.get(destinationFileName)); } catch(final IOException e) { @@ -362,9 +384,27 @@ Hello!</screen></td> <para>Though there is no <code language="java">... catch (FileAlreadyExistsException e)...</code> clause dealing with this checked exception we still get the indicated warning. Give an explanation.</para> - </chapter> - <chapter xml:id="task6"> + <section xml:id="sd1_exam_2019_summer_solve5"> + <title>Solution</title> + + <para>The exception class <classname + xlink:href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/FileAlreadyExistsException.html">FileAlreadyExistsException</classname> + inherits from <classname + xlink:href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/FileSystemException.html">FileSystemException</classname> + which in turn inherits from <classname + xlink:href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html">IOException</classname>. + Thus <classname + xlink:href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/FileAlreadyExistsException.html">FileAlreadyExistsException</classname> + being a subclass of <classname + xlink:href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html">IOException</classname> + will be caught and can thus never be thrown. This contradicts the <code + language="java">throws</code> declaration giving rise to a compiler + warning.</para> + </section> + </section> + + <section xml:id="sd1_exam_2019_summer_task6"> <title>Software project bonus points</title> <para>This pseudo task allows for awarding bonus points relating to your @@ -383,5 +423,5 @@ Hello!</screen></td> <para>For the sake of clarity: You can achieve the topmost possible marking without having any bonus point.</para> - </chapter> -</book> + </section> +</section> diff --git a/Doc/Sd1/appendix.xml b/Doc/Sd1/appendix.xml index e1d448b79..696c19413 100644 --- a/Doc/Sd1/appendix.xml +++ b/Doc/Sd1/appendix.xml @@ -3060,4 +3060,17 @@ Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.372 sec</scree </figure> </section> </section> + + <section xml:id="sd1_exams"> + <title>Past Software Development 1 examinations</title> + + <xi:include href="Exam/2018/Summer/exam.xml" xpointer="element(/1)" + ns:idfixup="auto"/> + + <xi:include href="Exam/2018/Winter/exam.xml" xpointer="element(/1)" + ns:idfixup="auto"/> + + <xi:include href="Exam/2019/Summer/exam.xml" xpointer="element(/1)" + ns:idfixup="auto"/> + </section> </appendix> diff --git a/ws/Docbook/CustomLayer/Klausur/docbook2klausur.xsl b/ws/Docbook/CustomLayer/Klausur/docbook2klausur.xsl index 51dc8b81c..58516387b 100644 --- a/ws/Docbook/CustomLayer/Klausur/docbook2klausur.xsl +++ b/ws/Docbook/CustomLayer/Klausur/docbook2klausur.xsl @@ -17,11 +17,11 @@ <xsl:include href="common.xsl"/> - <xsl:template match="/db:book"> - <xsl:apply-templates select="db:chapter"/> + <xsl:template match="/db:section"> + <xsl:apply-templates select="db:section" mode="firstLevel"/> </xsl:template> - <xsl:template match="db:chapter"> + <xsl:template match="db:section" mode="firstLevel"> <xsl:document href="{@xml:id}.html" method="html" indent="no"> <html> <body > @@ -38,8 +38,8 @@ </xsl:template> - <!-- Title in ILIAS --> - <xsl:template match="db:chapter/db:title"/> + <!-- Task titles belong to ILIAS --> + <xsl:template match="/db:section/db:section/db:title"/> <!-- Sectioning --> <xsl:template match="db:section"> -- GitLab