<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="et">
	<id>http://courses.cs.taltech.ee/w/index.php?action=history&amp;feed=atom&amp;title=ITI0011-2016%3Aharjutus_18</id>
	<title>ITI0011-2016:harjutus 18 - Redigeerimiste ajalugu</title>
	<link rel="self" type="application/atom+xml" href="http://courses.cs.taltech.ee/w/index.php?action=history&amp;feed=atom&amp;title=ITI0011-2016%3Aharjutus_18"/>
	<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=ITI0011-2016:harjutus_18&amp;action=history"/>
	<updated>2026-04-05T22:32:02Z</updated>
	<subtitle>Selle lehekülje redigeerimiste ajalugu</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>http://courses.cs.taltech.ee/w/index.php?title=ITI0011-2016:harjutus_18&amp;diff=4498&amp;oldid=prev</id>
		<title>Ago: /* Mall */</title>
		<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=ITI0011-2016:harjutus_18&amp;diff=4498&amp;oldid=prev"/>
		<updated>2016-05-03T07:52:47Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Mall&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;et&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←Vanem redaktsioon&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Redaktsioon: 3. mai 2016, kell 07:52&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l78&quot; &gt;78. rida:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;78. rida:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     public EX18Test(EX18Interface ex18Interface) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     public EX18Test(EX18Interface ex18Interface) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         this.ex18Interface = ex18Interface;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         this.ex18Interface = ex18Interface;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    }&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    // example&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    @Test&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    public void TestEncrypt() {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        // test that decrypt(&amp;quot;bcd&amp;quot;, 1) returns &amp;quot;abc&amp;quot;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        assertEquals(&amp;quot;abc&amp;quot;, ex18Interface.decrypt(&amp;quot;bcd&amp;quot;, 1));&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ago</name></author>
	</entry>
	<entry>
		<id>http://courses.cs.taltech.ee/w/index.php?title=ITI0011-2016:harjutus_18&amp;diff=4491&amp;oldid=prev</id>
		<title>Ago: Uus lehekülg: &#039;== Üldine ==  Kaitsmised: 09. - 13. mai 2016&lt;br /&gt; Kaust gitis: EX18  Tähelepanu, selle ülesande puhul kirjutate te ise testid. Ülesande kaitsmisel vaadatakse teie testid ül...&#039;</title>
		<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=ITI0011-2016:harjutus_18&amp;diff=4491&amp;oldid=prev"/>
		<updated>2016-05-01T23:26:19Z</updated>

		<summary type="html">&lt;p&gt;Uus lehekülg: &amp;#039;== Üldine ==  Kaitsmised: 09. - 13. mai 2016&amp;lt;br /&amp;gt; Kaust gitis: EX18  Tähelepanu, selle ülesande puhul kirjutate te ise testid. Ülesande kaitsmisel vaadatakse teie testid ül...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Uus lehekülg&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Üldine ==&lt;br /&gt;
&lt;br /&gt;
Kaitsmised: 09. - 13. mai 2016&amp;lt;br /&amp;gt;&lt;br /&gt;
Kaust gitis: EX18&lt;br /&gt;
&lt;br /&gt;
Tähelepanu, selle ülesande puhul kirjutate te ise testid. Ülesande kaitsmisel vaadatakse teie testid üle. Automaatselt seda tulemust, mis tester annab, ei saa. Kui test nimega &amp;lt;code&amp;gt;TestCorrectClass&amp;lt;/code&amp;gt; läbi ei lähe, ei saa ülesannet kaitsma tulla.&lt;br /&gt;
&lt;br /&gt;
== Ülesanne ==&lt;br /&gt;
&lt;br /&gt;
Ülesandes peate kirjutama testid [[ITI0011:harjutus_03|EX03]] ülesande kohta.&lt;br /&gt;
&lt;br /&gt;
Kuna testide testimine on suhteliselt keeruline, siis lõplik hinne selgub kaitsmisel. Kindlasti peab testeris töötama test nimega &amp;lt;code&amp;gt;TestCorrectClass&amp;lt;/code&amp;gt;. See testib, et ega õige lahendus ei ebaõnnestu testidega.&lt;br /&gt;
&lt;br /&gt;
== Mall ==&lt;br /&gt;
&lt;br /&gt;
Kasuta etteantud malli. Esitama pead vaid EX18Test.java (jäta etteantud kood muutmata, lisa oma testid).&lt;br /&gt;
&lt;br /&gt;
EX18Interface.java (seda faili pole vaja üles panna):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
public interface EX18Interface {&lt;br /&gt;
    public String encrypt(String plainText, int rotation);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Finds the most frequently occurring letter in text.&lt;br /&gt;
     * @param text either plain or encrypted text.&lt;br /&gt;
     * @return the most frequently occurring letter in text.&lt;br /&gt;
     */&lt;br /&gt;
    public String findMostFrequentlyOccurringLetter(String text);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Removes the most prevalent letter from text.&lt;br /&gt;
     * @param text either plain or encrypted text.&lt;br /&gt;
     * @return text in which the most prevalent letter has been removed.&lt;br /&gt;
     */&lt;br /&gt;
    public String minimizeText(String text);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Given the initial rotation and the encrypted text, this method&lt;br /&gt;
     * decrypts said text.&lt;br /&gt;
     * @param cryptoText Encrypted text.&lt;br /&gt;
     * @param rotation How many letters to the right the alphabet was&lt;br /&gt;
     *                 shifted in order to encrypt text.&lt;br /&gt;
     * @return Decrypted text.&lt;br /&gt;
     */&lt;br /&gt;
    public String decrypt(String cryptoText, int rotation);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
EX18.java (seda faili pole vaja üles panna; võid kasutada EX03 lahendust):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
public class EX18 implements EX18Interface {&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
EX18Test.java&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import org.junit.Test;&lt;br /&gt;
import org.junit.runner.RunWith;&lt;br /&gt;
import org.junit.runners.Parameterized;&lt;br /&gt;
&lt;br /&gt;
import java.util.Arrays;&lt;br /&gt;
import java.util.Collection;&lt;br /&gt;
import java.util.List;&lt;br /&gt;
&lt;br /&gt;
import static org.junit.Assert.*;&lt;br /&gt;
&lt;br /&gt;
@RunWith(Parameterized.class)&lt;br /&gt;
public class EX18Test {&lt;br /&gt;
    public EX18Interface ex18Interface;&lt;br /&gt;
    static List&amp;lt;Object&amp;gt; manyEX18;&lt;br /&gt;
&lt;br /&gt;
    @Parameterized.Parameters&lt;br /&gt;
    public static Collection&amp;lt;Object&amp;gt; instancesToTest() {&lt;br /&gt;
        if (manyEX18 == null) return Arrays.asList(new EX18());&lt;br /&gt;
        return manyEX18;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public EX18Test(EX18Interface ex18Interface) {&lt;br /&gt;
        this.ex18Interface = ex18Interface;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // write your tests here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ago</name></author>
	</entry>
</feed>