diff --git a/Doc/Sd1/appendix.xml b/Doc/Sd1/appendix.xml index 80c0485ecc7e8080cd20f27b14f88492952439cb..e7a4bfc9c0b2e9515c4204cafbcecefce9baf723 100644 --- a/Doc/Sd1/appendix.xml +++ b/Doc/Sd1/appendix.xml @@ -160,199 +160,194 @@ </itemizedlist> <para>So if the examination's result is 85% a bonus of 10% will result in - a mark corresponding to 95% of a regular exam result.</para> + a mark corresponding to 95% of a regular exam result. The following rules + apply:</para> - <section xml:id="sd1SectProjectCriteria"> - <title>Marking criteria / Hints</title> - - <orderedlist> - <listitem> - <para>You are expected to work as a team of three partners.</para> - </listitem> - - <listitem> - <para>Using the <link - xlink:href="https://gitlab.mi.hdm-stuttgart.de/">MI Gitlab - SCM</link> is a plus with respect to the project's - evaluation.</para> - </listitem> - - <listitem> - <para>Your team is expected to supply a Maven project based on the - MI <quote>Maven archetype quickstart</quote> available from <uri - xlink:href="https://maven.mi.hdm-stuttgart.de/archetype-catalog.xml">https://maven.mi.hdm-stuttgart.de</uri>.</para> - </listitem> - - <listitem> - <para>You are expected to provide good internal code documentation - with respect both to method signatures (<xref - linkend="glo_Javadoc"/>) and method implementation. Possible - problems involve:</para> + <orderedlist> + <listitem> + <para>You are expected to work as a team of three partners.</para> + </listitem> - <glosslist> - <glossentry> - <glossterm>Compile time warnings</glossterm> + <listitem> + <para>Using the <link + xlink:href="https://gitlab.mi.hdm-stuttgart.de/">MI Gitlab SCM</link> + is a plus with respect to the project's evaluation.</para> + </listitem> - <glossdef> - <para>Activate most compiler warnings at - <guimenuitem>Window</guimenuitem> --> - <guimenuitem>Preferences</guimenuitem> --> - <guimenuitem>Java</guimenuitem> --> - <guimenuitem>Compiler</guimenuitem> - --><guimenuitem>Errors/Warnings</guimenuitem>. This will - show potential compile time problems like dead / unnecessary / - unreachable code, unused variable values, shadowing conflicts - and so on:</para> - - <mediaobject> - <imageobject> - <imagedata fileref="Ref/Fig/bonusJavadocCompileTimeProblems.png"/> - </imageobject> - </mediaobject> - </glossdef> - </glossentry> + <listitem> + <para>Your team is expected to supply a Maven project based on the MI + <quote>Maven archetype quickstart</quote> available from <uri + xlink:href="https://maven.mi.hdm-stuttgart.de/archetype-catalog.xml">https://maven.mi.hdm-stuttgart.de</uri>.</para> + </listitem> - <glossentry xml:id="sd1BonusprojectActivateJavadocWarnings"> - <glossterm><xref linkend="glo_Javadoc"/> mismatches</glossterm> + <listitem> + <para>You are expected to provide good internal code documentation + with respect both to method signatures (<xref linkend="glo_Javadoc"/>) + and method implementation. Possible problems involve:</para> + + <glosslist> + <glossentry> + <glossterm>Compile time warnings</glossterm> + + <glossdef> + <para>Activate most compiler warnings at + <guimenuitem>Window</guimenuitem> --> + <guimenuitem>Preferences</guimenuitem> --> + <guimenuitem>Java</guimenuitem> --> + <guimenuitem>Compiler</guimenuitem> + --><guimenuitem>Errors/Warnings</guimenuitem>. This will show + potential compile time problems like dead / unnecessary / + unreachable code, unused variable values, shadowing conflicts + and so on:</para> + + <mediaobject> + <imageobject> + <imagedata fileref="Ref/Fig/bonusJavadocCompileTimeProblems.png"/> + </imageobject> + </mediaobject> + </glossdef> + </glossentry> + + <glossentry xml:id="sd1BonusprojectActivateJavadocWarnings"> + <glossterm><xref linkend="glo_Javadoc"/> mismatches</glossterm> + + <glossdef> + <para>Your method's formal parameters, their type and a method's + return type must match your documentation. In the following code + snippet the method <methodname>getPrimeFactors(...)</methodname> + does have neither a parameter named <property>prime</property> + nor <property>frequency</property>:</para> + + <mediaobject> + <imageobject> + <imagedata fileref="Ref/Fig/bonusJavadocMismatch.png"/> + </imageobject> + </mediaobject> + + <tip> + <itemizedlist> + <listitem> + <para>Activate most <xref linkend="glo_Javadoc"/> related + warnings in your IDE globally per workspace below + <guimenuitem>Window</guimenuitem> --> + <guimenuitem>Preferences</guimenuitem> --> + <guimenuitem>Java</guimenuitem> --> + <guimenuitem>Compiler</guimenuitem> --> + <guimenuitem>Javadoc</guimenuitem>. You may as well + activate them as per project settings below + <guimenuitem>Project</guimenuitem> --> + <guimenuitem>Properties</guimenuitem> --> + <guimenuitem>Java Compiler</guimenuitem> --> + <guimenuitem>Javadoc</guimenuitem> if ticking + <quote>Project specific settings</quote>.</para> + </listitem> + + <listitem> + <para>Actually generate the <xref linkend="glo_Javadoc"/> + <xref linkend="glo_HTML"/> and see whether it will be + useful / sufficient to a programmer using your + <code>public</code> interface.</para> + </listitem> + </itemizedlist> + </tip> + </glossdef> + </glossentry> + </glosslist> + </listitem> - <glossdef> - <para>Your method's formal parameters, their type and a - method's return type must match your documentation. In the - following code snippet the method - <methodname>getPrimeFactors(...)</methodname> does have - neither a parameter named <property>prime</property> nor - <property>frequency</property>:</para> - - <mediaobject> - <imageobject> - <imagedata fileref="Ref/Fig/bonusJavadocMismatch.png"/> - </imageobject> - </mediaobject> - - <tip> - <itemizedlist> - <listitem> - <para>Activate most <xref linkend="glo_Javadoc"/> - related warnings in your IDE globally per workspace - below <guimenuitem>Window</guimenuitem> --> - <guimenuitem>Preferences</guimenuitem> --> - <guimenuitem>Java</guimenuitem> --> - <guimenuitem>Compiler</guimenuitem> --> - <guimenuitem>Javadoc</guimenuitem>. You may as well - activate them as per project settings below - <guimenuitem>Project</guimenuitem> --> - <guimenuitem>Properties</guimenuitem> --> - <guimenuitem>Java Compiler</guimenuitem> --> - <guimenuitem>Javadoc</guimenuitem> if ticking - <quote>Project specific settings</quote>.</para> - </listitem> - - <listitem> - <para>Actually generate the <xref - linkend="glo_Javadoc"/> <xref linkend="glo_HTML"/> and - see whether it will be useful / sufficient to a - programmer using your <code>public</code> - interface.</para> - </listitem> - </itemizedlist> - </tip> - </glossdef> - </glossentry> - </glosslist> - </listitem> + <listitem> + <para>You are expected to provide meaningful unit tests:</para> - <listitem> - <para>You are expected to provide meaningful unit tests:</para> + <itemizedlist> + <listitem> + <para>Try to cover all your implementation code and not just + isolated modules / methods.</para> + </listitem> - <itemizedlist> - <listitem> - <para>Try to cover all your implementation code and not just - isolated modules / methods.</para> - </listitem> + <listitem> + <para>If methods allow for null values write suitable + tests.</para> + </listitem> - <listitem> - <para>If methods allow for null values write suitable - tests.</para> - </listitem> + <listitem> + <para>Test special cases: If a method expects i.e. an array of + strings it may be allowed having zero length.</para> + </listitem> + </itemizedlist> + </listitem> - <listitem> - <para>Test special cases: If a method expects i.e. an array of - strings it may be allowed having zero length.</para> - </listitem> - </itemizedlist> - </listitem> + <listitem> + <para>Your resulting project should be easily installable / + runnable.</para> - <listitem> - <para>Your resulting project should be easily installable / - runnable.</para> + <itemizedlist> + <listitem> + <para>Maven is a good starting point with respect both to test + integration and cross platform (Unix / Windows / Apple) + portability.</para> + </listitem> - <itemizedlist> - <listitem> - <para>Maven is a good starting point with respect both to test - integration and cross platform (Unix / Windows / Apple) - portability.</para> - </listitem> + <listitem> + <para>Avoid dependencies to local file system resources like + <filename>c:\users\xyz\testdata.txt</filename>.</para> + </listitem> + </itemizedlist> + + <tip> + <para>Test your application's deployability by installing it to an + untouched target platform (possibly of a different hard/software + architecture) and execute <command>mvn</command> + <option>test</option> (provided you do have written meaningful unit + tests).</para> + </tip> + </listitem> + </orderedlist> - <listitem> - <para>Avoid dependencies to local filesystem resources like - <filename>c:\users\xyz\testdata.txt</filename>.</para> - </listitem> - </itemizedlist> - - <tip> - <para>Test your application's deployability by installing it to an - untouched target platform (possibly of a different hard/software - architecture) and execute <command>mvn</command> - <option>test</option> (provided you do have written meaningful - unit tests).</para> - </tip> - </listitem> - </orderedlist> + <para>Marking criteria may vary. As of current winter term 2016 the + following rules of thumb apply:</para> - <para>Marking criteria may vary. As of current winter term 2016 the - following rules of thumb apply:</para> + <informaltable border="1"> + <colgroup width="30%"/> - <informaltable border="1"> - <colgroup width="30%"/> + <colgroup width="10%"/> - <colgroup width="10%"/> + <tr> + <td>Code quality</td> - <tr> - <td>Code quality</td> + <td>25%</td> + </tr> - <td>25%</td> - </tr> + <tr> + <td>Code documentation</td> - <tr> - <td>Code documentation</td> + <td>25%</td> + </tr> - <td>25%</td> - </tr> + <tr> + <td>(Unit) Tests</td> - <tr> - <td>(Unit) Tests</td> + <td>25%</td> + </tr> - <td>25%</td> - </tr> + <tr> + <td>Deployment</td> - <tr> - <td>Deployment</td> + <td>15%</td> + </tr> - <td>15%</td> - </tr> + <tr> + <td>Using <link xlink:href="https://gitlab.mi.hdm-stuttgart.de">Source + code management (Git)</link></td> - <tr> - <td>Using <link - xlink:href="https://gitlab.mi.hdm-stuttgart.de">Source code - management (Git)</link></td> + <td>10%</td> + </tr> + </informaltable> - <td>10%</td> - </tr> - </informaltable> - </section> + <para>The following sections contain both the current and archived project + propositions.</para> <section xml:id="sd1SectProjectAddressDatabase"> - <title>An address database</title> + <title>An address database (Winter 2016)</title> <para>Consider executing <command>java</command> <option>-jar <link xlink:href="/Sd1/Ref/Src/address.zip">address.zip</link></option>:</para> @@ -430,7 +425,7 @@ Your choice: 2</programlisting> <callout arearefs="sd1CalloutAddressDbProject-3-co" xml:id="sd1CalloutAddressDbProject-3"> - <para>Creating a new person record </para> + <para>Creating a new person record</para> </callout> <callout arearefs="sd1CalloutAddressDbProject-4-co" @@ -440,7 +435,9 @@ Your choice: 2</programlisting> </calloutlist> <para>In order for entries to survive program termination we need a - persistence mechanism. The example application will create a new file + <link + xlink:href="https://en.wikipedia.org/wiki/Persistence_(computer_science)">persistence</link> + mechanism. The example application will create a new file <filename>address.txt</filename> on first invocation when adding at least one person:</para> @@ -456,11 +453,35 @@ Eve,Gardener, ,32-44-2234</programlisting> xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#split-java.lang.String-">String.split(...)</link> is your friend when reading this file on program startup using <quote>,</quote> as separator split token.</para> + + <para>The following resources may help you getting started with <xref + linkend="glo_Java"/> file input/output:</para> + + <itemizedlist> + <listitem> + <para><link + xlink:href="https://www.tutorialspoint.com/java/java_files_io.htm">TutorialsPoint + Java - Files and I/O</link></para> + </listitem> + + <listitem> + <para><link + xlink:href="https://docs.oracle.com/javase/tutorial/essential/io">Oracle + The Java™ Tutorials Lesson: Basic I/O</link></para> + </listitem> + + <listitem> + <para><link + xlink:href="http://tutorials.jenkov.com/java-io">jenkov.com Java IO + Tutorial</link></para> + </listitem> + </itemizedlist> </section> <section xml:id="sd1SectProjectGrep"> <title>Poor man's <xref linkend="glo_UNIX"/> <command - xlink:href="http://linux.die.net/man/1/grep">grep</command>.</title> + xlink:href="http://linux.die.net/man/1/grep">grep</command>. (Summer + 2016)</title> <para>The <xref linkend="glo_UNIX"/> operating system provides a command <command xlink:href="http://linux.die.net/man/1/grep">grep</command>