diff --git a/Tests/Sd1/003/Exam/.gitignore b/Tests/Sd1/003/Exam/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a2fa20469808363ab656f8206d63c6b2e92a83b8 --- /dev/null +++ b/Tests/Sd1/003/Exam/.gitignore @@ -0,0 +1,5 @@ +/.classpath +/.project +/.settings +/.idea +/*.iml diff --git a/Tests/Sd1/003/Exam/pom.xml b/Tests/Sd1/003/Exam/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..a9817576be25b1d6aa9dc734ebcbddea540adb18 --- /dev/null +++ b/Tests/Sd1/003/Exam/pom.xml @@ -0,0 +1,94 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>de.hdm-stuttgart.mi.sd1</groupId> + <artifactId>sd1_test_3</artifactId> + <version>0.8</version> + <packaging>jar</packaging> + + <name>sd1_test_3</name> + + <url>http://www.mi.hdm-stuttgart.de/freedocs/topic/de.hdm_stuttgart.mi.lectures/sd1SectUsingMaven.html</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <repositories> + <repository> + <id>hdm-mi-internal-maven-repo</id> + <url>https://maven.mi.hdm-stuttgart.de/artifacts</url> + </repository> + </repositories> + + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <version>2.6</version> + </dependency> + + <dependency> + <groupId>de.hdm_stuttgart.mi.exam</groupId> + <artifactId>unitmarking</artifactId> + <version>0.9</version> + </dependency> + + </dependencies> + + <build> + <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.5.1</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.10.3</version> + <configuration /> + </plugin> + + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.3</version> + <configuration> + <descriptor>src/main/assembly/assembly.xml</descriptor> + </configuration> + <executions> + <execution> + <id>make-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <archive> + <manifest> + <mainClass>de.hdm_stuttgart.mi.sd1.test.ShowReachedPoints</mainClass> + </manifest> + </archive> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> + </build> +</project> diff --git a/Tests/Sd1/003/Exam/src/main/assembly/assembly.xml b/Tests/Sd1/003/Exam/src/main/assembly/assembly.xml new file mode 100644 index 0000000000000000000000000000000000000000..1a2cd6054a519cef9fe38484b72ae28aba730bc5 --- /dev/null +++ b/Tests/Sd1/003/Exam/src/main/assembly/assembly.xml @@ -0,0 +1,36 @@ +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"> + <id>fat-tests</id> + <formats> + <format>jar</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <dependencySets> + <dependencySet> + <outputDirectory>/</outputDirectory> + <useProjectArtifact>true</useProjectArtifact> + <unpack>true</unpack> + <scope>test</scope> + </dependencySet> + </dependencySets> + <fileSets> + <fileSet> + <directory>${project.build.directory}/test-classes</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>**/*.class</include> + </includes> + <useDefaultExcludes>true</useDefaultExcludes> + </fileSet> + <fileSet> + <directory>${project.build.directory}/classes</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>**/*.class</include> + </includes> + <useDefaultExcludes>true</useDefaultExcludes> + </fileSet> + </fileSets> +</assembly> diff --git a/Tests/Sd1/003/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/BodenlegerKosten.java b/Tests/Sd1/003/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/BodenlegerKosten.java new file mode 100644 index 0000000000000000000000000000000000000000..ac5f82147a766cab03b47a808a78c7f45ce1d66c --- /dev/null +++ b/Tests/Sd1/003/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/BodenlegerKosten.java @@ -0,0 +1,102 @@ +package de.hdm_stuttgart.mi.sd1.aufgabe1; + +/** + * <p>Kostenabrechnung der Bodenverlegung eines einzelnen, rechteckförmigen Raums. + * Dabei gibt es folgende Anteile:</p> + * + * <dl> + * <dt>Flächenkosten:</dt> + * <dd>Das Produkt aus der Anzahl verlegter Quadratmeter und den Kosten des verwendeten Materials + * (Teppich, Parkett, Fliesen,...) pro Quadratmeter.</dd> + * + * <dt>Kosten Sockelleisten:</dt> + * <dd>Die Gesamtlänge der am Rand des Bodens verlegten Sockelleisten multipliziert mit dem + * Preis pro Meter der verwendeten Leiste.</dd> + * + * <dt>Anfahrtskosten:</dt> + * <dd> + * <ul> + * <li>Pro Kilometer Anfahrt werden {@link #kostenProKilometer} berechnet.</li> + * + * <li>Ab einem Grundpreis (Kosten ohne Anfahrt) von {@link #freigrenzeAnfahrt} werden keine + * Anfahrtskosten berechnet.</li> + * + * </ul> + * </dd> + * + * </dl> + * + */ +public class BodenlegerKosten { + + /** + * Kosten pro Kilometer Anfahrtsweg in Euro. + */ + public static final double kostenProKilometer = 0.3; + + /** + * Ab diesem Wert für die eigentliche Verlegung entfallen die Kosten + * für den Anfahrtsweg. + */ + public static final double freigrenzeAnfahrt = 900.00; + + /** + * Die Dimension des rechteckigen Raums. + * + * @param breite Raumbreite in Meter + * @param laenge Raumlänge in Meter + */ + public BodenlegerKosten(final double breite, final double laenge) { + // TODO: Implementiere mich korrekt. + } + + /** + * Raumfläche + * @return Die Fläche des Raums in Quadratmetern. + */ + public double getFlaeche() { + return 12232; // TODO: Implementiere mich korrekt. + } + + /** + * Umfang, also Länge aller Seitenwände. + * @return Der Umfang des Raums in Metern. + */ + public double getUmfang() { + return -331;// TODO: Implementiere mich korrekt. + } + + /** + * <p>Grundpreis für die Verlegung des Bodens und der Sockelleisten an den Rändern des Bodens.</p> + * + * <p>Beispiel: Für einen Raum der Größe 5m x 3m ergibt sich bei Laminat von 10€ pro Quadratmeter + * und Sockelleisten von 2€ pro Meter Länge:</p> + * + * <p> 5 * 3 * 10€ + 2 * (5 + 3) * 2€</> + * + * <p>Hinweis: Im Türbereich werden keine Sockelleisten benötigt. Dieser Unterschied + * wird als vernachlässigbar klein angesehen.</p> + * + * @param quadratmeterPreis Preis pro Quadratmeter des verwendeten Materials. + * @param meterPreis Preis pro Meter der verwendeten Sockelleiste. + * + * @return Summe der Kosten verlegte Bodenfläche und Länge aller Sockelleisten. + */ + public double getVerlegungskosten(final double quadratmeterPreis, final double meterPreis) { + return -71.13;// TODO: Implementiere mich korrekt. + } + + /** + * Gesamtkosten bestehend aus Verlegung und Anfahrtsweg. + * + * @param quadratmeterPreis + * @param meterPreis + * @param laengeAnfahrtsweg + * @return Grundkosten gemäß {@link #getVerlegungskosten(double, double)} und Kosten für Anfahrtsweg + * gemäß {@link #kostenProKilometer}, falls die Verlegungskosten kleiner {@link #freigrenzeAnfahrt} sind. + */ + public double getGesamtKosten(final double quadratmeterPreis, final double meterPreis, final int laengeAnfahrtsweg) { + + return -71.13;// TODO: Implementiere mich korrekt. + } +} \ No newline at end of file diff --git a/Tests/Sd1/003/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/Helper.java b/Tests/Sd1/003/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/Helper.java new file mode 100644 index 0000000000000000000000000000000000000000..d163c7ac3393fbf11b885d58f38ef8403512bf2b --- /dev/null +++ b/Tests/Sd1/003/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/Helper.java @@ -0,0 +1,16 @@ +package de.hdm_stuttgart.mi.sd1.aufgabe1; + +public class Helper { + + /** + * <p>Die Quersumme einer Zahl. Beispiel: Die Quersumme von 324 ist 3 + 2 + 4 == 9.</p> + * <p>Das Vorzeichen soll übernommenwerden. Beispiel: Die Quersumme von -324 ist -9.</p> + * + * @param wert + * @return Die zum Wert gehörende Quersumme. + * + */ + static public long quersumme(long wert) { + return -234324; // TODO: Implementiere mich korrekt. + } +} \ No newline at end of file diff --git a/Tests/Sd1/003/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/Kreis.java b/Tests/Sd1/003/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/Kreis.java new file mode 100644 index 0000000000000000000000000000000000000000..742b7695b5139b6a9ccb9689821528b25b48b734 --- /dev/null +++ b/Tests/Sd1/003/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/Kreis.java @@ -0,0 +1,17 @@ +package de.hdm_stuttgart.mi.sd1.aufgabe2; + +public class Kreis { + + public Kreis(final double x, final double y, final double r) { + } + + /** + * <p>Ist der andere Kreis vollständig vom gegebenen Kreis umschlossen?</p> + * + * @param anderer Ein anderer Kreis + * @return true, falls der gegebene Kreis den anderen Kreis vollständig umschließt, sonst false. + */ + public boolean enthaelt (final Kreis anderer) { + return false; // TODO: Implementiere mich korrekt. + } +} \ No newline at end of file diff --git a/Tests/Sd1/003/Exam/src/main/resources/log4j2.xml b/Tests/Sd1/003/Exam/src/main/resources/log4j2.xml new file mode 100644 index 0000000000000000000000000000000000000000..130f87a144c4eb0107a846e580c8fa7f5e819fc1 --- /dev/null +++ b/Tests/Sd1/003/Exam/src/main/resources/log4j2.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Configuration> + <Appenders> + <File name="A1" fileName="A1.log" append="false"> + <PatternLayout pattern="%t %-5p %c{2} - %m%n"/> + </File> + <Console name="STDOUT" target="SYSTEM_OUT"> + <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> + </Console> + </Appenders> + <Loggers> + + <!-- You my want to define class or package level per-logger rules --> + <Logger name="de.hdm_stuttgart.mi.sd1.App" level="debug"> + <AppenderRef ref="A1"/> + </Logger> + <Root level="info"> + <AppenderRef ref="STDOUT"/> + </Root> + </Loggers> +</Configuration> \ No newline at end of file diff --git a/Tests/Sd1/003/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/ShowReachedPoints.java b/Tests/Sd1/003/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/ShowReachedPoints.java new file mode 100644 index 0000000000000000000000000000000000000000..43259d064914c42ae021e1097039d67fa194c673 --- /dev/null +++ b/Tests/Sd1/003/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/ShowReachedPoints.java @@ -0,0 +1,22 @@ +package de.hdm_stuttgart.mi.sd1.test; + +import de.hdm_stuttgart.mi.exam.unitmarking.RunTests; +import de.hdm_stuttgart.mi.sd1.test.aufgabe1.TestBodenlegerKosten; +import de.hdm_stuttgart.mi.sd1.test.aufgabe1.TestHelper; +import de.hdm_stuttgart.mi.sd1.test.aufgabe2.TestKreis; + +public class ShowReachedPoints { + + /** + * Execution reveals the number of reached points. + * + * @param args Unused + */ + public static void main(String[] args) { + RunTests.exec( + "Aufgabe 1" + , TestBodenlegerKosten.class, TestHelper.class); + + RunTests.exec("Aufgabe 2", TestKreis.class); + } +} diff --git a/Tests/Sd1/003/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/TestBodenlegerKosten.java b/Tests/Sd1/003/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/TestBodenlegerKosten.java new file mode 100644 index 0000000000000000000000000000000000000000..fac549414099e9f15c58359e4ebcb5ddd1c9c9b1 --- /dev/null +++ b/Tests/Sd1/003/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/TestBodenlegerKosten.java @@ -0,0 +1,84 @@ +package de.hdm_stuttgart.mi.sd1.test.aufgabe1; + +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; +import de.hdm_stuttgart.mi.sd1.aufgabe1.BodenlegerKosten; + +/** + * <p>Testen des Auftretens eines Teil-String in einem vorgegebenen String.</p> + * + */ +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class TestBodenlegerKosten extends ExaminationTestDefaults { + + static final double delta = 1E-15;// Toleranz bei double Wertvergleichen + + /** + * Raumfläche. + */ + @Test + @Marking(points=3) + public void test_100() { + Assert.assertEquals( + 15, + new BodenlegerKosten(5, 3).getFlaeche(), delta); + } + + /** + * Raumumfang. + */ + @Test + @Marking(points=3) + public void test_110() { + Assert.assertEquals( + 16, + new BodenlegerKosten(5, 3).getUmfang(), delta); + } + + /** + * Basiskosten Verlegung + */ + @Test + @Marking(points=3) + public void test_200() { + Assert.assertEquals( + 296.30, + new BodenlegerKosten(5, 3).getVerlegungskosten(17.3, 2.3), + delta); + Assert.assertEquals( + 296.30, + new BodenlegerKosten(3, 5).getVerlegungskosten(17.3, 2.3), + delta); + } + + /** + * Gesamtkosten mit Anfahrtskosten + */ + @Test + @Marking(points=3) + public void test_300() { + Assert.assertEquals( + 163.5, + new BodenlegerKosten(2, 3).getGesamtKosten(18, 3, 85), + delta); + } + + /** + * Gesamtkosten, Anfahrtskosten entfallen + */ + @Test + @Marking(points=3) + public void test_320() { + Assert.assertEquals( + 3800, + new BodenlegerKosten(10, 15).getGesamtKosten(24, 4, 85), + delta); + } + + +} \ No newline at end of file diff --git a/Tests/Sd1/003/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/TestHelper.java b/Tests/Sd1/003/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/TestHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..d1401ff962dbc9b6b62ffabd625edafa8545e376 --- /dev/null +++ b/Tests/Sd1/003/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/TestHelper.java @@ -0,0 +1,74 @@ +package de.hdm_stuttgart.mi.sd1.test.aufgabe1; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; +import de.hdm_stuttgart.mi.sd1.aufgabe1.BodenlegerKosten; +import de.hdm_stuttgart.mi.sd1.aufgabe1.Helper; +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +/** + * <p>Testen des Auftretens eines Teil-String in einem vorgegebenen String.</p> + * + */ +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class TestHelper extends ExaminationTestDefaults { + + + /** + * 1 --> 1 + */ + @Test + @Marking(points=1) + public void test_110() { + Assert.assertEquals(1, Helper.quersumme(1)); + } + + /** + * -1 --> -1 + */ + @Test + @Marking(points=1) + public void test_120() { + Assert.assertEquals(-1, Helper.quersumme(-1)); + } + + /** + * -2234 --> -11 + */ + @Test + @Marking(points=1) + public void test_125() { + Assert.assertEquals(-11, Helper.quersumme(-2234)); + } + + /** + * 23 --> 5 + */ + @Test + @Marking(points=1) + public void test_130() { + Assert.assertEquals(5, Helper.quersumme(23)); + } + + /** + * 54321 --> 15 + */ + @Test + @Marking(points=1) + public void test_140() { + Assert.assertEquals(15, Helper.quersumme(54321)); + } + + /** + * 22345112345522234 --> 50 + */ + @Test + @Marking(points=1) + public void test_100() { + Assert.assertEquals(50, Helper.quersumme(22345112345522234L)); + } + +} \ No newline at end of file diff --git a/Tests/Sd1/003/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/TestKreis.java b/Tests/Sd1/003/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/TestKreis.java new file mode 100644 index 0000000000000000000000000000000000000000..923bd563b4826f58b60caa34dc69e9a388518dcd --- /dev/null +++ b/Tests/Sd1/003/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/TestKreis.java @@ -0,0 +1,76 @@ +package de.hdm_stuttgart.mi.sd1.test.aufgabe2; + +import de.hdm_stuttgart.mi.sd1.aufgabe2.Kreis; +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; + +/** + * Teste Kreise. + * + */ + +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class TestKreis extends ExaminationTestDefaults { + + /** + * (0,0, 4) enthält (0, 0, 3) + * Konzentrische Kreise um Ursprung, größerer enthält kleineren. + */ + @Test + @Marking(points=1) + public void test_100() { + Assert.assertTrue(new Kreis(0,0,4).enthaelt(new Kreis(0,0,3))); + } + + /** + * (0,0, 3) enthält (0, 0, 4) nicht + * Konzentrische Kreise um Ursprung, kleinerer enthält größeren nicht. + */ + @Test + @Marking(points=1) + public void test_110() { + Assert.assertTrue(new Kreis(0,0,4).enthaelt(new Kreis(0,0,3))); + } + + /** + * (4, 4, 3) enthält (5, 3, 1). + */ + @Test + @Marking(points=1) + public void test_117() { + Assert.assertTrue(new Kreis(4,-4,3).enthaelt(new Kreis(5,-3,1))); + } + /** + * Gespiegelt: (4, 4, 3) enthält (5, 3, 1). + */ + @Test + @Marking(points=1) + public void test_115() { + Assert.assertTrue(new Kreis(4,4,3).enthaelt(new Kreis(5,3,1))); + } + + /** + * (4, 4, 3) schneidet (2, 6, 1). + */ + @Test + @Marking(points=1) + public void test_120() { + Assert.assertFalse(new Kreis(4,4,3).enthaelt(new Kreis(2,6,1))); + } + + /** + * Gespiegelt: (-4, -4, 3) schneidet (-4, -6, 1). + */ + @Test + @Marking(points=1) + public void test_130() { + Assert.assertFalse(new Kreis(4,4,3).enthaelt(new Kreis(2,6,1))); + } + + +} \ No newline at end of file diff --git a/Tests/Sd1/003/Solve/.gitignore b/Tests/Sd1/003/Solve/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a2fa20469808363ab656f8206d63c6b2e92a83b8 --- /dev/null +++ b/Tests/Sd1/003/Solve/.gitignore @@ -0,0 +1,5 @@ +/.classpath +/.project +/.settings +/.idea +/*.iml diff --git a/Tests/Sd1/003/Solve/Doc/Fig/kreise.svg b/Tests/Sd1/003/Solve/Doc/Fig/kreise.svg new file mode 100644 index 0000000000000000000000000000000000000000..c14383f6f1ee3f196666016a03f5f9bfd59afbae --- /dev/null +++ b/Tests/Sd1/003/Solve/Doc/Fig/kreise.svg @@ -0,0 +1,492 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="63.107208mm" + height="60.894871mm" + viewBox="0 0 63.107208 60.894871" + version="1.1" + id="svg8" + inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" + sodipodi:docname="kreise.svg"> + <defs + id="defs2"> + <marker + inkscape:stockid="TriangleOutM" + orient="auto" + refY="0" + refX="0" + id="marker1281" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path1279" + d="M 5.77,0 -2.88,5 V -5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="scale(0.4)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="TriangleOutM" + orient="auto" + refY="0" + refX="0" + id="TriangleOutM" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path1142" + d="M 5.77,0 -2.88,5 V -5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="scale(0.4)" + inkscape:connector-curvature="0" /> + </marker> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="2.8" + inkscape:cx="138.45077" + inkscape:cy="111.82475" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:snap-bbox="true" + inkscape:bbox-paths="false" + inkscape:bbox-nodes="true" + inkscape:snap-bbox-midpoints="false" + inkscape:window-width="1600" + inkscape:window-height="1145" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:snap-nodes="true" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0"> + <inkscape:grid + type="xygrid" + id="grid10" + units="mm" + spacingx="5" + spacingy="5" + originx="207.15595" + originy="-255" /> + </sodipodi:namedview> + <metadata + id="metadata5"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(207.15595,18.894871)"> + <path + style="fill:none;stroke:#000000;stroke-width:0.31036055px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker1281)" + d="m -205,37 h 60.06957" + id="path12" + inkscape:connector-curvature="0" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.315;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#TriangleOutM)" + d="M -200,42 V -18" + id="path14" + inkscape:connector-curvature="0" /> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-195.5085" + y="42" + id="text18"><tspan + sodipodi:role="line" + id="tspan16" + x="-195.5085" + y="42" + style="stroke-width:0.26458332">1</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-190.31419" + y="42" + id="text22"><tspan + sodipodi:role="line" + id="tspan20" + x="-190.31419" + y="42" + style="stroke-width:0.26458332">2</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-185.28319" + y="41.940056" + id="text26"><tspan + sodipodi:role="line" + id="tspan24" + x="-185.28319" + y="41.940056" + style="stroke-width:0.26458332">3</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-180.21085" + y="42" + id="text30"><tspan + sodipodi:role="line" + id="tspan28" + x="-180.21085" + y="42" + style="stroke-width:0.26458332">4</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-175.29559" + y="41.940056" + id="text34"><tspan + sodipodi:role="line" + id="tspan32" + x="-175.29559" + y="41.940056" + style="stroke-width:0.26458332">5</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-170.27492" + y="41.940056" + id="text38"><tspan + sodipodi:role="line" + id="tspan36" + x="-170.27492" + y="41.940056" + style="stroke-width:0.26458332">6</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-206.38493" + y="33.543056" + id="text18-3"><tspan + sodipodi:role="line" + id="tspan16-6" + x="-206.38493" + y="33.543056" + style="stroke-width:0.26458332">1</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-206.2516" + y="28.570963" + id="text22-7"><tspan + sodipodi:role="line" + id="tspan20-5" + x="-206.2516" + y="28.570963" + style="stroke-width:0.26458332">2</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-206.25677" + y="23.540991" + id="text26-3"><tspan + sodipodi:role="line" + id="tspan24-5" + x="-206.25677" + y="23.540991" + style="stroke-width:0.26458332">3</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-206.27847" + y="18.543058" + id="text30-6"><tspan + sodipodi:role="line" + id="tspan28-2" + x="-206.27847" + y="18.543058" + style="stroke-width:0.26458332">4</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-206.25264" + y="13.513086" + id="text34-9"><tspan + sodipodi:role="line" + id="tspan32-1" + x="-206.25264" + y="13.513086" + style="stroke-width:0.26458332">5</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-206.27434" + y="8.5409908" + id="text38-2"><tspan + sodipodi:role="line" + id="tspan36-7" + x="-206.27434" + y="8.5409908" + style="stroke-width:0.26458332">6</tspan></text> + <flowRoot + xml:space="preserve" + id="flowRoot88" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none" + transform="scale(0.26458333)"><flowRegion + id="flowRegion90"><rect + id="rect92" + width="302.36221" + height="37.795277" + x="-793.70081" + y="139.84251" /></flowRegion><flowPara + id="flowPara94"></flowPara></flowRoot> <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-165.28732" + y="42" + id="text98"><tspan + sodipodi:role="line" + id="tspan96" + x="-165.28732" + y="42" + style="stroke-width:0.26458332">7</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-160.27078" + y="41.940056" + id="text102"><tspan + sodipodi:role="line" + id="tspan100" + x="-160.27078" + y="41.940056" + style="stroke-width:0.26458332">8</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-155.26251" + y="41.940056" + id="text106"><tspan + sodipodi:role="line" + id="tspan104" + x="-155.26251" + y="41.940056" + style="stroke-width:0.26458332">9</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-150.5085" + y="41.940056" + id="text110"><tspan + sodipodi:role="line" + id="tspan108" + x="-150.5085" + y="41.940056" + style="stroke-width:0.26458332">10</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-206.25883" + y="3.5430582" + id="text98-0"><tspan + sodipodi:role="line" + id="tspan96-9" + x="-206.25883" + y="3.5430582" + style="stroke-width:0.26458332">7</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-206.27434" + y="-1.4590088" + id="text102-3"><tspan + sodipodi:role="line" + id="tspan100-6" + x="-206.27434" + y="-1.4590088" + style="stroke-width:0.26458332">8</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-206.26193" + y="-6.4590087" + id="text106-0"><tspan + sodipodi:role="line" + id="tspan104-6" + x="-206.26193" + y="-6.4590087" + style="stroke-width:0.26458332">9</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="-207.66444" + y="-11.459009" + id="text110-2"><tspan + sodipodi:role="line" + id="tspan108-6" + x="-207.66444" + y="-11.459009" + style="stroke-width:0.26458332">10</tspan></text> + <circle + style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.50006253;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path148" + cx="-175.25" + cy="22.25" + r="5" /> + <ellipse + style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.5291667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path150" + cx="-179.875" + cy="17.125" + rx="14.756098" + ry="14.756097" /> + <circle + style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.5291667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path148-1" + cx="-170.25" + cy="-2.75" + r="5" /> + <circle + style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.5291667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path148-8" + cx="-190.25" + cy="7.25" + r="5" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="M -200.31851,32.002264 -145,32" + id="path2027" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="M -200.78141,27.208636 -145,27" + id="path2027-7" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="M -200.78141,22.208636 -145,22" + id="path2027-9" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="M -200.78141,17.208636 -145,17" + id="path2027-2" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="M -200.78141,12.208636 -145,12" + id="path2027-0" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="M -200.78141,7.2086357 -145,7" + id="path2027-23" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="M -200.78141,2.2086357 -145,2" + id="path2027-75" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="M -200.78141,-2.7913643 -145,-3" + id="path2027-92" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="M -200.78141,-7.7913643 -145,-8" + id="path2027-28" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="M -200.78141,-12.791364 -145,-13" + id="path2027-97" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="M -194.9998,-17.791364 -195,37" + id="path2027-97-3" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="m -189.9248,-18 -2e-4,54.791363" + id="path2027-97-3-6" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="m -185.075,-18 -2e-4,54.791363" + id="path2027-97-3-1" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="m -179.9248,-18 -2e-4,54.791363" + id="path2027-97-3-2" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="m -175.075,-18 -2e-4,54.791363" + id="path2027-97-3-9" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="m -170.075,-18 -2e-4,54.791363" + id="path2027-97-3-3" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="m -165.075,-18 -2e-4,54.791363" + id="path2027-97-3-19" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="m -159.9248,-18 -2e-4,54.791363" + id="path2027-97-3-4" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="m -155.075,-18 -2e-4,54.791363" + id="path2027-97-3-7" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.15000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.15, 0.45;stroke-dashoffset:0;stroke-opacity:1" + d="m -149.9248,-18 -2e-4,54.791363" + id="path2027-97-3-8" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + </g> +</svg> diff --git a/Tests/Sd1/003/Solve/Doc/klausur.xml b/Tests/Sd1/003/Solve/Doc/klausur.xml new file mode 100644 index 0000000000000000000000000000000000000000..b7a7db870938b965bb01e89ef33dba22e2e41f5d --- /dev/null +++ b/Tests/Sd1/003/Solve/Doc/klausur.xml @@ -0,0 +1,319 @@ +<?xml version="1.0" encoding="UTF-8"?> +<book version="5.0" xml:id="klausur_SoSe_2017" 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"> + <!-- saxon9he-xslt -s:klausur.xml -xsl:/usr/share/hdm-docbook-xsl/CustomLayer/Klausur/docbook2klausur.xsl --> + + <info> + <title/> + + <author> + <personname/> + </author> + + <pubdate/> + </info> + + <chapter xml:id="task1"> + <title>Klassenmethoden</title> + + <!-- Hier gemeinsames zip Archiv hochladen, auch von anderen Aufgaben. --> + + <section xml:id="aufgabe1_prepare"> + <title>Vorbereitung</title> + + <para>Entpacken Sie das oben sichtbare Archiv + <filename>exam.zip</filename> und importieren Sie den resultierenden + Ordner <filename>Exam</filename> als <productname>Maven</productname> + Projekt in Ihren <productname>Eclipse</productname> <foreignphrase + xml:lang="en">Workspace</foreignphrase>.</para> + </section> + + <section xml:id="aufgabe1_descr"> + <title>Beschreibung</title> + + <para>Implementierung vorbereiteter Methoden gemäß + <productname>Javadoc</productname> Beschreibungen und nachfolgend + beschriebener Funktionalitäten. Sie bekommen bei unvollständiger + Implementierung Teilpunkte.</para> + </section> + + <section xml:id="aufgabe1_task"> + <title>Aufgabe</title> + + <para>Vervollständigen Sie die Implementierung aller Methoden aus + folgenden Klassen im <foreignphrase + xml:lang="en">package</foreignphrase> + <package>de.hdm_stuttgart.mi.sd1.aufgabe1</package>:</para> + + <itemizedlist> + <listitem> + <para><classname>BodenlegerKosten</classname></para> + </listitem> + + <listitem> + <para><classname>Helper</classname></para> + </listitem> + </itemizedlist> + + <tip> + <para>Das <foreignphrase xml:lang="en">package</foreignphrase> + <package>de.hdm_stuttgart.mi.sd1.test.aufgabe1</package> im Test Zweig + Ihres Projekts enthält zugehörige <productname>Junit</productname> + Testklassen:</para> + + <itemizedlist> + <listitem> + <para><classname>TestBodenlegerKosten</classname></para> + </listitem> + + <listitem> + <para><classname>TestHelper</classname></para> + </listitem> + </itemizedlist> + </tip> + </section> + + <section xml:id="aufgabe1_commonHints"> + <title>Allgemeine Hinweise</title> + + <itemizedlist> + <listitem> + <para>Für jede Methode stehen Ihnen in der zugehörigen Testklasse + korrespondierende Tests zur Verfügung. Nutzen Sie diese!</para> + </listitem> + + <listitem> + <para>Die von Ihnen erreichte Punktzahl richtet sich nach der Anzahl + positiv bestandener Tests. Sie bekommen keine Punkte, wenn Ihre + Implementierung in Bezug auf einen einzelnen Test lediglich + <quote>fast richtig</quote> ist. Implementieren Sie im Zweifelsfall + weniger Methoden, diese dafür aber vollständig.</para> + </listitem> + + <listitem> + <para>Die <productname>Javadoc</productname> Kommentare der + jeweiligen Methoden beschreiben das gewünschte Verhalten. Unter + <link + xlink:href="https://freedocs.mi.hdm-stuttgart.de/sd1SectMavenGenerateJavadoc.html">Generating + Javadoc™ project documentation</link> finden Sie eine Anleitung zur + Umwandlung in das HTML Format zwecks besserer Lesbarkeit.</para> + + <para>Lesen Sie die (generierte) Dokumentation <emphasis + role="bold">sehr genau</emphasis>.</para> + </listitem> + + <listitem> + <para>Beachten Sie alle Sonderfälle. Dazu zählen insbesondere + <code>null</code> Werte von Variablen oder enthaltene + <code>null</code> Werte in <foreignphrase + xml:lang="en">Arrays</foreignphrase>.</para> + </listitem> + + <listitem> + <para>Nutzen Sie den <foreignphrase + xml:lang="en">Debugger</foreignphrase> oder logging <foreignphrase + xml:lang="en">Statements</foreignphrase> im Fall fehlgeschlagener + Testfälle.</para> + </listitem> + + <listitem> + <para>Die Ausführung von + <package>de.hdm_stuttgart.mi.sd1.test</package>.<classname>ShowAllReachedPoints</classname> + im Testzweig Ihres Projekts als <productname>Java</productname> + Anwendung (nicht als Junit Test!) zeigt Ihnen zu jedem Zeitpunkt die + in allen Programmieraufgaben bislang erreichten Punkte.</para> + </listitem> + </itemizedlist> + </section> + + <section version="5.1" xml:id="uploadFirst" xml:lang="de"> + <title>Hochladen Ihrer Lösung in das Klausursystem</title> + + <para>Exportieren Sie Ihre Implementierung dieser und weiterer + Programmieraufgaben per Rechtsklick im <foreignphrase + xml:lang="en">Package Explorer</foreignphrase> Ihres + <productname>Eclipse</productname> Projekts. Klicken Sie im + <foreignphrase xml:lang="en">Package Explorer</foreignphrase> (Maus + Rechtsklick) auf Ihre Projektwurzel und exportieren Sie über das + Kontextmenü <quote>Export</quote> → <quote>General</quote> → + <quote>Archive File</quote> einen auf <filename>.zip</filename> endenden + Archivnamen, z.B. <filename>solution_1.zip</filename>. Laden Sie danach + <filename>solution_1.zip</filename> über die <quote><foreignphrase + xml:lang="en">Upload</foreignphrase> File</quote> Funktion am unteren + Seitenende des <productname>Ilias</productname> Klausursystems hoch. + Wichtige Punkte:</para> + + <itemizedlist> + <listitem> + <para>Achten Sie auf vollständigen Export. Im Exportmenü können Sie + (versehentlich) einzelne Ordner, wie z.B. <filename>src</filename>, + abwählen. In diesem Fall wird Ihr Quellcode nicht in das Archiv + <filename>solution_1.zip</filename> exportiert.</para> + </listitem> + + <listitem> + <para>Wählen Sie beim Hochladen nicht die falsche Datei, etwa das + Ausgangsarchiv <filename>exam.zip</filename> oder eine ältere + Version Ihres Projekts.</para> + </listitem> + + <listitem> + <para>Kontrollieren Sie nach dem Hochladen die Sichtbarkeit Ihres + <filename>solution_1.zip</filename> Archivs im Klausursystem.</para> + </listitem> + + <listitem> + <para>Sie können mehrere Versionen + <filename>solution_2.zip</filename> ... hochladen und bei Bedarf + ältere im <productname>Ilias</productname> System löschen. Nur die + zuletzt hochgeladene Version wird bewertet.</para> + </listitem> + </itemizedlist> + + <caution> + <itemizedlist> + <listitem> + <para>Reservieren Sie für den Vorgang des Hochladens ausreichend + Zeit vor Klausurende.</para> + </listitem> + + <listitem> + <para>Bearbeitungen, welche sich nach Klausurende lediglich auf + Ihrem Arbeitsplatzrechner befinden, werden nicht gewertet.</para> + </listitem> + + <listitem> + <para>Laden Sie keine Projekte mit <productname>Java</productname> + Syntaxfehlern hoch, diese werden nicht bewertet!</para> + </listitem> + + <listitem> + <para>Exportieren Sie Ihr Projekt nicht als + <filename>.tgz</filename>, <filename>.java</filename>, + <filename>.tar.gz</filename> <acronym>o.ä.</acronym>. Das + Klausursystem akzeptiert nur Archive mit der Endung + <filename>.zip</filename>.</para> + </listitem> + </itemizedlist> + </caution> + </section> + </chapter> + + <chapter xml:id="task2"> + <title>Kreise</title> + + <section xml:id="aufgabe2_prepare"> + <title>Vorbereitung</title> + + <para>Falls Sie die erste Aufgabe »<xref linkend="task1"/>« bearbeitet + haben, arbeiten Sie einfach an Ihrem <productname>Maven</productname> + Projekt weiter. Ansonsten lesen Sie bitte die Anleitung in der Aufgabe + »<xref linkend="task1"/>« zum <productname>Eclipse</productname> + <productname>Maven</productname> Projektimport sowie weitere Hinweise + zum Hochladen in das <productname>Ilias</productname> System.</para> + </section> + + <section xml:id="aufgabe2_descr"> + <title>Beschreibung</title> + + <para>Implementierung einer Methode zur Prüfung, ob ein gegebener Kreis + einen anderen Kreis enthält.</para> + + <para>Das <productname>Maven</productname> Projektskelett enthält eine + Klasse <classname>Kreis</classname> im <foreignphrase + xml:lang="en">Package</foreignphrase> + <package>de.hdm_stuttgart.mi.sd1.aufgabe2</package>.</para> + + <para>Implementieren Sie die Klasse und insbesondere den Konstruktor + sowie die Methode <methodname>enthaelt(...)</methodname>. Nutzen Sie zum + Test Ihrer Implementierung die <productname>Junit</productname> Tests in + <package>de.hdm_stuttgart.mi.sd1.test.aufgabe2</package>.<classname>TestKreis</classname>.</para> + + <tip> + <orderedlist> + <listitem> + <para>Zur Berechnung des Abstandes zwischen zwei Punktkoordinaten + können Sie die Methode <methodname + xlink:href="https://docs.oracle.com/javase/9/docs/api/java/lang/Math.html#sqrt-double-">Math.sqrt()</methodname> + oder besser <methodname + xlink:href="https://docs.oracle.com/javase/9/docs/api/java/lang/Math.html#hypot-double-double-">Math.hypot()</methodname> + verwenden.</para> + </listitem> + + <listitem> + <para>Unter <link + xlink:href="https://learn.mi.hdm-stuttgart.de/ilias/data/iliasclient1/mobs/mm_14078/kreise.png">https://learn.mi.hdm-stuttgart.de/ilias/data/iliasclient1/mobs/mm_14078/kreise.png</link> + finden Sie eine hilfreiche Illustration mit passenden + Testkoordinaten und Radien.</para> + </listitem> + </orderedlist> + </tip> + </section> + + <section version="5.1" xml:id="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 Aufgabe »<xref linkend="task1"/>« + 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> + + <itemizedlist> + <listitem> + <para>Ich habe die aktuelle Aufgabe bearbeitet und erhoffe dafür + Punkte.</para> + </listitem> + + <listitem> + <para>Ich habe die aktuelle Aufgabe nicht bearbeitet.</para> + </listitem> + </itemizedlist> + </section> + </chapter> + + <chapter xml:id="task3"> + <title>Compile time Fehler</title> + + <para>Wir betrachten:</para> + + <programlisting language="java">public static int max (int a, int b, int c) { + if (a < b) { + if (b < c) { + return c; + } else { + return b; + } + } else { + if (a < c) { + return c; + } + } +}<emphasis role="red"> // Fehler: Missing Return Statement</emphasis></programlisting> + + <orderedlist> + <listitem> + <para>Was bedeutet der Compile time Fehler »Missing Return Statement«? + Erklären Sie dessen Auftreten, obwohl doch sogar drei + <code>return</code> Anweisungen vorhanden sind.</para> + </listitem> + + <listitem> + <para>Korrigieren Sie diesen Fehler durch eine minimale + Ergänzung.</para> + </listitem> + </orderedlist> + </chapter> +</book> diff --git a/Tests/Sd1/003/Solve/pom.xml b/Tests/Sd1/003/Solve/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..149a410cd024f895413e24d3024fd97910c0b459 --- /dev/null +++ b/Tests/Sd1/003/Solve/pom.xml @@ -0,0 +1,94 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>de.hdm-stuttgart.mi.sd1</groupId> + <artifactId>sd1_test_3</artifactId> + <version>0.9</version> + <packaging>jar</packaging> + + <name>sd1_test_3</name> + + <url>http://www.mi.hdm-stuttgart.de/freedocs/topic/de.hdm_stuttgart.mi.lectures/sd1SectUsingMaven.html</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <repositories> + <repository> + <id>hdm-mi-internal-maven-repo</id> + <url>https://maven.mi.hdm-stuttgart.de/artifacts</url> + </repository> + </repositories> + + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <version>2.6</version> + </dependency> + + <dependency> + <groupId>de.hdm_stuttgart.mi.exam</groupId> + <artifactId>unitmarking</artifactId> + <version>0.9</version> + </dependency> + + </dependencies> + + <build> + <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.5.1</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.10.3</version> + <configuration /> + </plugin> + + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.3</version> + <configuration> + <descriptor>src/main/assembly/assembly.xml</descriptor> + </configuration> + <executions> + <execution> + <id>make-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <archive> + <manifest> + <mainClass>de.hdm_stuttgart.mi.sd1.test.ShowReachedPoints</mainClass> + </manifest> + </archive> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> + </build> +</project> diff --git a/Tests/Sd1/003/Solve/src/main/assembly/assembly.xml b/Tests/Sd1/003/Solve/src/main/assembly/assembly.xml new file mode 100644 index 0000000000000000000000000000000000000000..1a2cd6054a519cef9fe38484b72ae28aba730bc5 --- /dev/null +++ b/Tests/Sd1/003/Solve/src/main/assembly/assembly.xml @@ -0,0 +1,36 @@ +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"> + <id>fat-tests</id> + <formats> + <format>jar</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <dependencySets> + <dependencySet> + <outputDirectory>/</outputDirectory> + <useProjectArtifact>true</useProjectArtifact> + <unpack>true</unpack> + <scope>test</scope> + </dependencySet> + </dependencySets> + <fileSets> + <fileSet> + <directory>${project.build.directory}/test-classes</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>**/*.class</include> + </includes> + <useDefaultExcludes>true</useDefaultExcludes> + </fileSet> + <fileSet> + <directory>${project.build.directory}/classes</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>**/*.class</include> + </includes> + <useDefaultExcludes>true</useDefaultExcludes> + </fileSet> + </fileSets> +</assembly> diff --git a/Tests/Sd1/003/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/BodenlegerKosten.java b/Tests/Sd1/003/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/BodenlegerKosten.java new file mode 100644 index 0000000000000000000000000000000000000000..392a906aab11517c6c05b048b44f1d9d8a8b5e38 --- /dev/null +++ b/Tests/Sd1/003/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/BodenlegerKosten.java @@ -0,0 +1,112 @@ +package de.hdm_stuttgart.mi.sd1.aufgabe1; + +/** + * <p>Kostenabrechnung der Bodenverlegung eines einzelnen, rechteckförmigen Raums. + * Dabei gibt es folgende Anteile:</p> + * + * <dl> + * <dt>Flächenkosten:</dt> + * <dd>Das Produkt aus der Anzahl verlegter Quadratmeter und den Kosten des verwendeten Materials + * (Teppich, Parkett, Fliesen,...) pro Quadratmeter.</dd> + * + * <dt>Kosten Sockelleisten:</dt> + * <dd>Die Gesamtlänge der am Rand des Bodens verlegten Sockelleisten multipliziert mit dem + * Preis pro Meter der verwendeten Leiste.</dd> + * + * <dt>Anfahrtskosten:</dt> + * <dd> + * <ul> + * <li>Pro Kilometer Anfahrt werden {@link #kostenProKilometer} berechnet.</li> + * + * <li>Ab einem Grundpreis (Kosten ohne Anfahrt) von {@link #freigrenzeAnfahrt} werden keine + * Anfahrtskosten berechnet.</li> + * + * </ul> + * </dd> + * + * </dl> + * + */ +public class BodenlegerKosten { + + /** + * Kosten pro Kilometer Anfahrtsweg in Euro. + */ + public static final double kostenProKilometer = 0.3; + + /** + * Ab diesem Wert für die eigentliche Verlegung entfallen die Kosten + * für den Anfahrtsweg. + */ + public static final double freigrenzeAnfahrt = 900.00; + + private final double breite, laenge; + + /** + * Die Dimension des rechteckigen Raums. + * + * @param breite Raumbreite in Meter + * @param laenge Raumlänge in Meter + */ + public BodenlegerKosten(final double breite, final double laenge) { + this.breite = breite; + this.laenge = laenge; + } + + /** + * Raumfläche + * @return Die Fläche des Raums in Quadratmetern. + */ + public double getFlaeche() { + return breite * laenge; + } + + /** + * Umfang, also Länge aller Seitenwände. + * @return Der Umfang des Raums in Metern. + */ + public double getUmfang() { + return 2 * (breite + laenge); + } + + /** + * <p>Grundpreis für die Verlegung des Bodens und der Sockelleisten an den Rändern des Bodens.</p> + * + * <p>Beispiel: Für einen Raum der Größe 5m x 3m ergibt sich bei Laminat von 10€ pro Quadratmeter + * und Sockelleisten von 2€ pro Meter Länge:</p> + * + * <p> 5 * 3 * 10€ + 2 * (5 + 3) * 2€</> + * + * <p>Hinweis: Im Türbereich werden keine Sockelleisten benötigt. Dieser Unterschied + * wird als vernachlässigbar klein angesehen.</p> + * + * @param quadratmeterPreis Preis pro Quadratmeter des verwendeten Materials. + * @param meterPreis Preis pro Meter der verwendeten Sockelleiste. + * + * @return Summe der Kosten verlegte Bodenfläche und Länge aller Sockelleisten. + */ + public double getVerlegungskosten(final double quadratmeterPreis, final double meterPreis) { + return breite * laenge * quadratmeterPreis + + 2 * (breite + laenge) * meterPreis; + } + + /** + * Gesamtkosten bestehend aus Verlegung und Anfahrtsweg. + * + * @param quadratmeterPreis + * @param meterPreis + * @param laengeAnfahrtsweg + * @return Grundkosten gemäß {@link #getVerlegungskosten(double, double)} und Kosten für Anfahrtsweg + * gemäß {@link #kostenProKilometer}, falls die Verlegungskosten kleiner {@link #freigrenzeAnfahrt} sind. + */ + public double getGesamtKosten(final double quadratmeterPreis, final double meterPreis, final int laengeAnfahrtsweg) { + + final double verlegungsKosten = getVerlegungskosten(quadratmeterPreis, meterPreis); + + if (verlegungsKosten < freigrenzeAnfahrt) { + return laengeAnfahrtsweg * kostenProKilometer + verlegungsKosten; + } else { + return verlegungsKosten; + } + } +} \ No newline at end of file diff --git a/Tests/Sd1/003/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/Helper.java b/Tests/Sd1/003/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/Helper.java new file mode 100644 index 0000000000000000000000000000000000000000..15c6b708b00e1a716c7caf2e73f0737787e4b69c --- /dev/null +++ b/Tests/Sd1/003/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/Helper.java @@ -0,0 +1,21 @@ +package de.hdm_stuttgart.mi.sd1.aufgabe1; + +public class Helper { + + /** + * <p>Die Quersumme einer Zahl. Beispiel: Die Quersumme von 324 ist 3 + 2 + 4 == 9.</p> + * <p>Das Vorzeichen soll übernommenwerden. Beispiel: Die Quersumme von -324 ist -9.</p> + * + * @param wert + * @return Die zum Wert gehörende Quersumme. + * + */ + static public long quersumme(long wert) { + int querSumme = 0; + while (0 != wert) { + querSumme += wert % 10; + wert /= 10; + } + return querSumme; + } +} \ No newline at end of file diff --git a/Tests/Sd1/003/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/Kreis.java b/Tests/Sd1/003/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/Kreis.java new file mode 100644 index 0000000000000000000000000000000000000000..cad7c567eb4bf9c1cc79399fb2a8f6dd8ca9f6c2 --- /dev/null +++ b/Tests/Sd1/003/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/Kreis.java @@ -0,0 +1,27 @@ +package de.hdm_stuttgart.mi.sd1.aufgabe2; + +public class Kreis { + + final double x, y, r; + + public Kreis(final double x, final double y, final double r) { + this.x = x; + this.y = y; + this.r = r; + } + + /** + * <p>Ist der andere Kreis vollständig vom gegebenen Kreis umschlossen?</p> + * + * @param anderer Ein anderer Kreis + * @return true, falls der gegebene Kreis den anderen Kreis vollständig umschließt, sonst false. + */ + public boolean enthaelt (final Kreis anderer) { + + double centerDistance = Math.sqrt( + (x - anderer.x) * (x - anderer.x) + + (y - anderer.y) * (y - anderer.y)); + + return centerDistance + anderer.r < r; + } +} \ No newline at end of file diff --git a/Tests/Sd1/003/Solve/src/main/resources/log4j2.xml b/Tests/Sd1/003/Solve/src/main/resources/log4j2.xml new file mode 100644 index 0000000000000000000000000000000000000000..130f87a144c4eb0107a846e580c8fa7f5e819fc1 --- /dev/null +++ b/Tests/Sd1/003/Solve/src/main/resources/log4j2.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Configuration> + <Appenders> + <File name="A1" fileName="A1.log" append="false"> + <PatternLayout pattern="%t %-5p %c{2} - %m%n"/> + </File> + <Console name="STDOUT" target="SYSTEM_OUT"> + <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> + </Console> + </Appenders> + <Loggers> + + <!-- You my want to define class or package level per-logger rules --> + <Logger name="de.hdm_stuttgart.mi.sd1.App" level="debug"> + <AppenderRef ref="A1"/> + </Logger> + <Root level="info"> + <AppenderRef ref="STDOUT"/> + </Root> + </Loggers> +</Configuration> \ No newline at end of file diff --git a/Tests/Sd1/003/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/ShowReachedPoints.java b/Tests/Sd1/003/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/ShowReachedPoints.java new file mode 100644 index 0000000000000000000000000000000000000000..43259d064914c42ae021e1097039d67fa194c673 --- /dev/null +++ b/Tests/Sd1/003/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/ShowReachedPoints.java @@ -0,0 +1,22 @@ +package de.hdm_stuttgart.mi.sd1.test; + +import de.hdm_stuttgart.mi.exam.unitmarking.RunTests; +import de.hdm_stuttgart.mi.sd1.test.aufgabe1.TestBodenlegerKosten; +import de.hdm_stuttgart.mi.sd1.test.aufgabe1.TestHelper; +import de.hdm_stuttgart.mi.sd1.test.aufgabe2.TestKreis; + +public class ShowReachedPoints { + + /** + * Execution reveals the number of reached points. + * + * @param args Unused + */ + public static void main(String[] args) { + RunTests.exec( + "Aufgabe 1" + , TestBodenlegerKosten.class, TestHelper.class); + + RunTests.exec("Aufgabe 2", TestKreis.class); + } +} diff --git a/Tests/Sd1/003/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/TestBodenlegerKosten.java b/Tests/Sd1/003/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/TestBodenlegerKosten.java new file mode 100644 index 0000000000000000000000000000000000000000..fac549414099e9f15c58359e4ebcb5ddd1c9c9b1 --- /dev/null +++ b/Tests/Sd1/003/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/TestBodenlegerKosten.java @@ -0,0 +1,84 @@ +package de.hdm_stuttgart.mi.sd1.test.aufgabe1; + +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; +import de.hdm_stuttgart.mi.sd1.aufgabe1.BodenlegerKosten; + +/** + * <p>Testen des Auftretens eines Teil-String in einem vorgegebenen String.</p> + * + */ +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class TestBodenlegerKosten extends ExaminationTestDefaults { + + static final double delta = 1E-15;// Toleranz bei double Wertvergleichen + + /** + * Raumfläche. + */ + @Test + @Marking(points=3) + public void test_100() { + Assert.assertEquals( + 15, + new BodenlegerKosten(5, 3).getFlaeche(), delta); + } + + /** + * Raumumfang. + */ + @Test + @Marking(points=3) + public void test_110() { + Assert.assertEquals( + 16, + new BodenlegerKosten(5, 3).getUmfang(), delta); + } + + /** + * Basiskosten Verlegung + */ + @Test + @Marking(points=3) + public void test_200() { + Assert.assertEquals( + 296.30, + new BodenlegerKosten(5, 3).getVerlegungskosten(17.3, 2.3), + delta); + Assert.assertEquals( + 296.30, + new BodenlegerKosten(3, 5).getVerlegungskosten(17.3, 2.3), + delta); + } + + /** + * Gesamtkosten mit Anfahrtskosten + */ + @Test + @Marking(points=3) + public void test_300() { + Assert.assertEquals( + 163.5, + new BodenlegerKosten(2, 3).getGesamtKosten(18, 3, 85), + delta); + } + + /** + * Gesamtkosten, Anfahrtskosten entfallen + */ + @Test + @Marking(points=3) + public void test_320() { + Assert.assertEquals( + 3800, + new BodenlegerKosten(10, 15).getGesamtKosten(24, 4, 85), + delta); + } + + +} \ No newline at end of file diff --git a/Tests/Sd1/003/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/TestHelper.java b/Tests/Sd1/003/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/TestHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..d1401ff962dbc9b6b62ffabd625edafa8545e376 --- /dev/null +++ b/Tests/Sd1/003/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/TestHelper.java @@ -0,0 +1,74 @@ +package de.hdm_stuttgart.mi.sd1.test.aufgabe1; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; +import de.hdm_stuttgart.mi.sd1.aufgabe1.BodenlegerKosten; +import de.hdm_stuttgart.mi.sd1.aufgabe1.Helper; +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +/** + * <p>Testen des Auftretens eines Teil-String in einem vorgegebenen String.</p> + * + */ +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class TestHelper extends ExaminationTestDefaults { + + + /** + * 1 --> 1 + */ + @Test + @Marking(points=1) + public void test_110() { + Assert.assertEquals(1, Helper.quersumme(1)); + } + + /** + * -1 --> -1 + */ + @Test + @Marking(points=1) + public void test_120() { + Assert.assertEquals(-1, Helper.quersumme(-1)); + } + + /** + * -2234 --> -11 + */ + @Test + @Marking(points=1) + public void test_125() { + Assert.assertEquals(-11, Helper.quersumme(-2234)); + } + + /** + * 23 --> 5 + */ + @Test + @Marking(points=1) + public void test_130() { + Assert.assertEquals(5, Helper.quersumme(23)); + } + + /** + * 54321 --> 15 + */ + @Test + @Marking(points=1) + public void test_140() { + Assert.assertEquals(15, Helper.quersumme(54321)); + } + + /** + * 22345112345522234 --> 50 + */ + @Test + @Marking(points=1) + public void test_100() { + Assert.assertEquals(50, Helper.quersumme(22345112345522234L)); + } + +} \ No newline at end of file diff --git a/Tests/Sd1/003/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/TestKreis.java b/Tests/Sd1/003/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/TestKreis.java new file mode 100644 index 0000000000000000000000000000000000000000..923bd563b4826f58b60caa34dc69e9a388518dcd --- /dev/null +++ b/Tests/Sd1/003/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/TestKreis.java @@ -0,0 +1,76 @@ +package de.hdm_stuttgart.mi.sd1.test.aufgabe2; + +import de.hdm_stuttgart.mi.sd1.aufgabe2.Kreis; +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; + +/** + * Teste Kreise. + * + */ + +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class TestKreis extends ExaminationTestDefaults { + + /** + * (0,0, 4) enthält (0, 0, 3) + * Konzentrische Kreise um Ursprung, größerer enthält kleineren. + */ + @Test + @Marking(points=1) + public void test_100() { + Assert.assertTrue(new Kreis(0,0,4).enthaelt(new Kreis(0,0,3))); + } + + /** + * (0,0, 3) enthält (0, 0, 4) nicht + * Konzentrische Kreise um Ursprung, kleinerer enthält größeren nicht. + */ + @Test + @Marking(points=1) + public void test_110() { + Assert.assertTrue(new Kreis(0,0,4).enthaelt(new Kreis(0,0,3))); + } + + /** + * (4, 4, 3) enthält (5, 3, 1). + */ + @Test + @Marking(points=1) + public void test_117() { + Assert.assertTrue(new Kreis(4,-4,3).enthaelt(new Kreis(5,-3,1))); + } + /** + * Gespiegelt: (4, 4, 3) enthält (5, 3, 1). + */ + @Test + @Marking(points=1) + public void test_115() { + Assert.assertTrue(new Kreis(4,4,3).enthaelt(new Kreis(5,3,1))); + } + + /** + * (4, 4, 3) schneidet (2, 6, 1). + */ + @Test + @Marking(points=1) + public void test_120() { + Assert.assertFalse(new Kreis(4,4,3).enthaelt(new Kreis(2,6,1))); + } + + /** + * Gespiegelt: (-4, -4, 3) schneidet (-4, -6, 1). + */ + @Test + @Marking(points=1) + public void test_130() { + Assert.assertFalse(new Kreis(4,4,3).enthaelt(new Kreis(2,6,1))); + } + + +} \ No newline at end of file diff --git a/ws/Docbook/CustomLayer/slide/slideHdm.xsl b/ws/Docbook/CustomLayer/slide/slideHdm.xsl deleted file mode 100644 index 743343bb4b6a0d8ae24ef1a10ecd07aad8f52d86..0000000000000000000000000000000000000000 --- a/ws/Docbook/CustomLayer/slide/slideHdm.xsl +++ /dev/null @@ -1,372 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:d="http://docbook.org/ns/docbook"> - - <xsl:import href="../../docbook-xsl/xhtml/chunk.xsl"/> - <xsl:import href="../../docbook-xsl/xhtml/highlight.xsl"/> - <xsl:import href="../../docbook-xsl/webhelp/xsl/webhelp-common.xsl"/> - <xsl:import href="../../docbook-xsl/webhelp/xsl/titlepage.templates.xsl"/> - - <xsl:import href="../Common/common.xsl"/> - <xsl:import href="../../Preprocess/Xsl/slideReference.xsl"/> - - <xsl:variable name="topicLookup" select="document('topics.tid.xml', .)"/> - - <xsl:template match="/"> - - <xsl:apply-templates select="(//d:chapter | //d:section | //d:appendix) [contains(@annotations, 'slide') or descendant::*[contains(@annotations, 'slide')]]" - mode = "slideUnit"/> - </xsl:template> - - - <xsl:template match="*" mode="slideUnit"> - <xsl:message> - <xsl:text>No template matching '</xsl:text> - <xsl:value-of select="name(.)"/> - <xsl:text>' and mode 'slideUnit'</xsl:text> - </xsl:message> - </xsl:template> - - <xsl:template match="d:chapter | d:section | d:appendix" mode="slideUnit"> - <xsl:param name="rootId"/> - <xsl:param name="sections"/> - - <xsl:variable name="slideFileName"> - <xsl:call-template name="slideFilename"> - <xsl:with-param name="slideContainerId" select="@xml:id"/> - </xsl:call-template> - </xsl:variable> - - <xsl:document href="{$slideFileName}" method="html" encoding="utf-8" indent="no"> - - <html lang="en"> - <head> - <title> - <xsl:value-of select="d:title"/> - </title> - <link href="common/css/positioning.css" rel="stylesheet" /> - <link href="reveal.js/css/reveal.css" rel="stylesheet" /> - <link href="reveal.js/css/theme/serif.css" id="theme" rel="stylesheet" /> - - <!-- Code syntax highlighting --> - <link href="reveal.js/lib/css/zenburn.css" rel="stylesheet" /> - - </head> - - <body> - <!-- Wrap the entire slide show in a div using the "reveal" class. --> - <div class="reveal"> - <!-- Wrap all slides in a single "slides" class --> - <div class="slides"> - <xsl:apply-templates select=".//d:figure" mode="slideDescendants"/> - </div> - </div> - - <script src="reveal.js/lib/js/head.min.js"></script> - <script src="reveal.js/js/reveal.js"></script> - <script>/*<![CDATA[*/ - - Reveal.initialize({ - controls: true, - progress: true, - history: true, - center: true, - width: '70%', - margin: 0.0, - - transition: 'convex', // none/fade/slide/convex/concave/zoom - - math: { - mathjax: 'mathjax/MathJax.js', - config: 'TeX-AMS-MML_HTMLorMML', // See http://docs.mathjax.org/en/latest/config-files.html - }, - // Optional reveal.js plugins - dependencies: [ - { src: 'reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } }, - { src: 'reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, - { src: 'reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, - { src: 'reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, - { src: 'reveal.js/plugin/zoom-js/zoom.js', async: true }, - { src: 'reveal.js/plugin/notes/notes.js', async: true }, - { src: 'reveal.js/plugin/math/math.js', async: true } - ] - }); - /*]]>*/</script> - </body> - </html> - </xsl:document> - </xsl:template> - - - <xsl:template match="*" mode="slideDescendants"> - <p> - <xsl:text>No template defined for element '</xsl:text> - <xsl:value-of select="name(.)"/> - <xsl:text>' in mode 'slideDescendants'.</xsl:text> - </p> - </xsl:template> - - <xsl:template match="d:figure" mode="slideDescendants"> - - <xsl:variable name="primarySectionId"> - <xsl:choose> - <xsl:when test="@xml:id"><xsl:value-of select="@xml:id"/></xsl:when> - <xsl:otherwise><xsl:value-of select="generate-id(.)"/></xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:variable name="titleNode" select="d:title"/> - - <xsl:variable name="baseSupplementDir"> - <xsl:if test="ancestor::*/@xml:base"> - <xsl:call-template name="hdm.get.leftmost.of.separator"> - <xsl:with-param name="path" select="ancestor::*/@xml:base"/> - <xsl:with-param name="separator" select="'/'"/> - </xsl:call-template> - <xsl:text>/</xsl:text> - </xsl:if> - </xsl:variable> - - <xsl:variable name="xfigBasename"> - <xsl:call-template name="hdm.get.leftmost.of.separator"> - <xsl:with-param name="path" select="d:mediaobject/d:imageobject/d:imagedata/@fileref"/> - <xsl:with-param name="separator" select="'.fig.svg'"/> - </xsl:call-template> - <xsl:call-template name="hdm.get.leftmost.of.separator"> - <xsl:with-param name="path" select="d:mediaobject/d:imageobject/d:imagedata/@fileref"/> - <xsl:with-param name="separator" select="'.multi.svg'"/> - </xsl:call-template> - </xsl:variable> - - <xsl:variable name="xfigBasenameSet" as="element()*"> - <xsl:if test="0 < string-length($xfigBasename)"> - <xsl:copy-of select="document(concat($xfigBasename, '.filenames'), .)/start/file"/> - </xsl:if> - </xsl:variable> - - <xsl:choose> - <xsl:when test="1 < count($xfigBasenameSet/*)"> - <xsl:for-each select="$xfigBasenameSet/*"> - <section> - <xsl:choose> - <xsl:when test="1 = position()"> - <xsl:attribute name="id"> - <xsl:value-of select="$primarySectionId"/> - </xsl:attribute> - </xsl:when> - <xsl:otherwise> - <xsl:attribute name="id" > - <xsl:value-of select="concat($primarySectionId, '-', position() - 1)"/> - </xsl:attribute> - <xsl:attribute name="data-transition">none</xsl:attribute> - </xsl:otherwise> - </xsl:choose> - - <xsl:apply-templates select="$titleNode"/> - <div class="mediaobject"> - <img alt="layered SVG image" width="810"> - <xsl:attribute name="src"> - <xsl:value-of select="$baseSupplementDir"/> - <xsl:value-of select="$xfigBasename"/> - <xsl:text>-</xsl:text> - <xsl:value-of select="position() - 1"/> - <xsl:text>.svg</xsl:text> - </xsl:attribute> - </img> - </div> - - <div class ="hdmfooter"> - <p> - <a target="_blank"> - <xsl:attribute name="href"> - <xsl:call-template name="href.target.uri"/> - </xsl:attribute> - <xsl:text>Lecture notes</xsl:text> - </a> - </p> - </div> - </section> - </xsl:for-each> - </xsl:when> - - <xsl:otherwise> <!-- no animated image --> - <section id="{$primarySectionId}"> - - <xsl:apply-templates select="."/> - - <div class ="hdmfooter"> - <p> - <a target="_blank"> - <xsl:attribute name="href"> - <xsl:call-template name="href.target.uri"/> - </xsl:attribute> - <xsl:text>Lecture notes</xsl:text> - </a> - <xsl:variable name="qandaId" select="@xml:id"/> - <xsl:if test="$topicLookup/map/entry[@id = $qandaId]"> - <xsl:text> | </xsl:text> - <xsl:variable name="tid" select="$topicLookup/map/entry[@id = $qandaId]/@tid"/> - <a target="_blank"> - <xsl:attribute name="href"> - <xsl:text>https://bb.mi.hdm-stuttgart.de/topic/</xsl:text> - <xsl:value-of select="$tid"/> - </xsl:attribute> - <img src="common/images/comment.svg" width="30ex" style="border: 0mm;"/> - <xsl:text> create comment</xsl:text> - </a> - </xsl:if> - </p> - </div> - </section> - </xsl:otherwise> - </xsl:choose> - - <xsl:variable name="currentFigureId" select="generate-id()"/> - <xsl:variable name="followupQandasets" - select="following::d:qandaset[generate-id(preceding::d:figure[1]) = $currentFigureId]"/> - <xsl:if test="$followupQandasets"> - - <xsl:if test="10 < count($followupQandasets)"> - <xsl:message> - <xsl:text>Warning: </xsl:text> - <xsl:value-of select="count($followupQandasets)"/> - <xsl:text> consecutive followup exercises at slide '</xsl:text> - <xsl:apply-templates select="d:title"/> - <xsl:text>', id=</xsl:text> - <xsl:value-of select="@xml:id"/> - </xsl:message> - </xsl:if> - <section id="{$primarySectionId}_followupExercise"> - <xsl:choose> - <xsl:when test="1 = count($followupQandasets)"> - <h3>Followup exercise</h3> - <xsl:apply-templates select="$followupQandasets" mode="createTitleLink"/> - </xsl:when> - <xsl:otherwise> - <h3>Followup exercises</h3> - <ul> - <xsl:for-each select="$followupQandasets"> - <li> - <xsl:apply-templates select="." mode="createTitleLink"/> - </li> - </xsl:for-each> - </ul> - </xsl:otherwise> - </xsl:choose> - </section> - - </xsl:if> - </xsl:template> - - <xsl:template match="d:qandaset" mode="createTitleLink"> - <xsl:variable name="linkTarget"> - <xsl:call-template name="href.target.uri"/> - </xsl:variable> - <xsl:choose> - <xsl:when test="d:title"> - <xsl:apply-templates select="d:title/node()" mode="createTitleLink"> - <xsl:with-param name="linkTarget" select="$linkTarget"/> - </xsl:apply-templates> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates select="preceding-sibling::d:title[1]/node()" mode="createTitleLink"> - <xsl:with-param name="linkTarget" select="$linkTarget"/> - </xsl:apply-templates> - </xsl:otherwise> - </xsl:choose> - </xsl:template> - - <xsl:template match="d:xref|d:link" mode="createTitleLink"> - <xsl:apply-templates select="."/> - </xsl:template> - - <xsl:template match="*|text()" mode="createTitleLink"> - <xsl:param name="linkTarget"/> - <a href="{$linkTarget}"> - <xsl:apply-templates select="."/> - </a> - </xsl:template> - - <!-- Get rid of block object names e.g. "Figure 3.1" --> - <xsl:template match="d:figure"> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="d:figure/d:title"> - <h3> - <xsl:apply-templates/> - </h3> - </xsl:template> - - <!-- Hack: Docbook XSL does not handle @valign in images--> - <xsl:template match="d:mediaobject[d:imageobject/d:imagedata[@valign]]"> - <img> - <xsl:attribute name="src"> - <xsl:if test="ancestor::*/@xml:base"> - <xsl:call-template name="hdm.get.leftmost.of.separator"> - <xsl:with-param name="path" select="ancestor::*/@xml:base"/> - <xsl:with-param name="separator" select="'/'"/> - </xsl:call-template> - <xsl:text>/</xsl:text> - </xsl:if> - <xsl:value-of select="d:imageobject/d:imagedata/@fileref"/> - </xsl:attribute> - - <xsl:attribute name="style"> - <xsl:variable name="dbValign" select="d:imageobject/d:imagedata/@valign"/> - - <xsl:text>vertical-align: </xsl:text> - <xsl:choose> - <xsl:when test="$dbValign = 'top'">text-top</xsl:when> - <xsl:when test="$dbValign = 'middle'">middle</xsl:when> - <xsl:when test="$dbValign = 'bottom'">text-bottom</xsl:when> - <xsl:otherwise> - <xsl:message> - <xsl:text>Unknown @valign value: </xsl:text> - <xsl:value-of select="$dbValign"/> - </xsl:message> - </xsl:otherwise> - </xsl:choose> - </xsl:attribute> - </img> - - </xsl:template> - - <xsl:template name="hdm.get.leftmost.of.separator"> - <xsl:param name="path"/> - <xsl:param name="separator"/> - <xsl:param name="start">1</xsl:param> - <xsl:if test="contains($path, $separator )"> - <xsl:if test="$start='0'"> - <xsl:value-of select="$separator"/> - </xsl:if> - <xsl:value-of select="substring-before($path, $separator)"/> - <xsl:call-template name="hdm.get.leftmost.of.separator"> - <xsl:with-param name="path" select="substring-after($path, $separator)"/> - <xsl:with-param name="separator" select="$separator"/> - <xsl:with-param name="start">0</xsl:with-param> - </xsl:call-template> - </xsl:if> - </xsl:template> - - <xsl:template match="d:videodata"> - <video controls="controls" preload="auto" width="50%"> - <xsl:attribute name="title"> - <xsl:value-of select="normalize-space(../../../d:title)"/> - </xsl:attribute> - - <xsl:variable name="hdm_ImageFilename"> <!-- hdm_ prefix: do not mess with docbook! --> - <xsl:call-template name="mediaobject.filename"> - <xsl:with-param name="object" select=".."/> - </xsl:call-template> - </xsl:variable> - - <source src="{$hdm_ImageFilename}" type='video/webm' /> - <source src="{$hdm_ImageFilename}.mp4" type='video/mp4'/> - <xsl:text>Your Browser does not support the video tag</xsl:text> - </video> - </xsl:template> - - -</xsl:stylesheet>