Skip to content
Snippets Groups Projects
Commit a4a09120 authored by Goik Martin's avatar Goik Martin
Browse files

Sd1 projects

parent 6e7abb6d
No related branches found
No related tags found
No related merge requests found
......@@ -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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment