From a4a0912048b0e4b9920cf593a1159666b09c47a4 Mon Sep 17 00:00:00 2001 From: Martin Goik <goik@hdm-stuttgart.de> Date: Wed, 16 Dec 2015 11:22:54 +0100 Subject: [PATCH] Sd1 projects --- Doc/Sd1/appendix.xml | 122 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/Doc/Sd1/appendix.xml b/Doc/Sd1/appendix.xml index 69853a72d..02fb12601 100644 --- a/Doc/Sd1/appendix.xml +++ b/Doc/Sd1/appendix.xml @@ -134,4 +134,126 @@ </glossentry> </glosslist> </section> + + <section version="5.0" xml:id="sd1SectExamAmendingProjects"> + <title>Examination bonus point project</title> + + <para>Each participant may start a project to gain a bonus with respect to + the final examination. This bonus is given as a percentage and will be + added to your final examinations mark. Possible values depending on a + project's achievements are:</para> + + <itemizedlist> + <listitem> + <para>0%</para> + </listitem> + + <listitem> + <para>5%</para> + </listitem> + + <listitem> + <para>10%</para> + </listitem> + </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> + + <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>Your team is expected to supply a Maven project based on the + MI Maven archetype quickstart.</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.</para> + </listitem> + + <listitem> + <para>You are expected to provide meaningful unit tests.</para> + </listitem> + + <listitem> + <para>Your resulting project should be easily installable / + runnable.</para> + </listitem> + </orderedlist> + </section> + + <section xml:id="sd1ProjectSieveErathostenes"> + <title>Project <link + xlink:href="https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes">Sieve + of Eratosthenes</link></title> + + <para>Create a prime number generator which allows for dynamic + growth:</para> + + <programlisting language="java">/** + * Prime number generator internally based on the + * "Sieve of Eratosthenes" + * https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes + * algorithm. + * + */ +public class Sieve { + + + public boolean isPrime(final int candidate) { + return false; //TODO + } + public PrimeFactor[] getPrimes() { + return null; //TODO + } + +}</programlisting> + + <para>This generator allows for decomposition into prime factors:</para> + + <programlisting language="java">/** + * An immutable describing prime factors and their multiplicity. Consider an example: + * + * 13230 = 2 *3 * 3 * 3 * 5 * 7 * 7 + * + * So 13230 consists of the following PrimeFactor constituents: + * + * 2 having frequency 1 + * 3 having frequency 3 + * 5 having frequency 1 + * 7 having frequency 2 + * + */ +public class PrimeFactor { + + /** + * A prime factor along with its frequency of appearance. + * @param factor The factor + * @param frequency The factor's frequency. + */ + public PrimeFactor(long factor, long frequency) { + this.factor = factor; + this.frequency = frequency; + } + + /** + * See {@link #PrimeFactor(long, long)}l + */ + public final long factor; + + /** + * See {@link #PrimeFactor(long, long)}l + */ + public long frequency; +}</programlisting> + </section> + </section> </appendix> -- GitLab