<?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-2015%3Aharjutus_01</id>
	<title>ITI0011-2015:harjutus 01 - 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-2015%3Aharjutus_01"/>
	<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=ITI0011-2015:harjutus_01&amp;action=history"/>
	<updated>2026-04-06T06:59:55Z</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-2015:harjutus_01&amp;diff=3838&amp;oldid=prev</id>
		<title>Ago: Ago teisaldas lehekülje ITI0011:harjutus 01 pealkirja ITI0011-2015:harjutus 01 alla</title>
		<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=ITI0011-2015:harjutus_01&amp;diff=3838&amp;oldid=prev"/>
		<updated>2016-01-31T23:25:31Z</updated>

		<summary type="html">&lt;p&gt;Ago teisaldas lehekülje &lt;a href=&quot;/pages/ITI0011:harjutus_01&quot; title=&quot;ITI0011:harjutus 01&quot;&gt;ITI0011:harjutus 01&lt;/a&gt; pealkirja &lt;a href=&quot;/pages/ITI0011-2015:harjutus_01&quot; title=&quot;ITI0011-2015:harjutus 01&quot;&gt;ITI0011-2015:harjutus 01&lt;/a&gt; alla&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;et&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←Vanem redaktsioon&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Redaktsioon: 31. jaanuar 2016, kell 23:25&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;et&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Erinevus puudub)&lt;/div&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-2015:harjutus_01&amp;diff=1474&amp;oldid=prev</id>
		<title>Ago – 9. veebruar 2015, kell 11:37</title>
		<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=ITI0011-2015:harjutus_01&amp;diff=1474&amp;oldid=prev"/>
		<updated>2015-02-09T11:37:16Z</updated>

		<summary type="html">&lt;p&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: 9. veebruar 2015, kell 11:37&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-l1&quot; &gt;1. rida:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;1. 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;Harjutuse tähtaeg on &amp;#039;&amp;#039;&amp;#039;3. praktikum&amp;#039;&amp;#039;&amp;#039;, mis toimub &amp;#039;&amp;#039;&amp;#039;10.-11. veebruaril&amp;#039;&amp;#039;&amp;#039;.&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;Harjutuse tähtaeg on &amp;#039;&amp;#039;&amp;#039;3. praktikum&amp;#039;&amp;#039;&amp;#039;, mis toimub &amp;#039;&amp;#039;&amp;#039;10.-11. veebruaril&amp;#039;&amp;#039;&amp;#039;.&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;&amp;#039;&amp;#039;&amp;#039;Üldine info harjutuse esitamise kohta: [[ITI0011:harjutused]].&amp;#039;&amp;#039;&amp;#039;&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;/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;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;== Kirjeldus ==&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;== Kirjeldus ==&lt;/div&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-2015:harjutus_01&amp;diff=1397&amp;oldid=prev</id>
		<title>Ago – 5. veebruar 2015, kell 09:11</title>
		<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=ITI0011-2015:harjutus_01&amp;diff=1397&amp;oldid=prev"/>
		<updated>2015-02-05T09:11:05Z</updated>

		<summary type="html">&lt;p&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: 5. veebruar 2015, kell 09:11&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-l10&quot; &gt;10. rida:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;10. 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;/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;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;Ülesanne tuleb laadida git repositooriumisse kausta &amp;quot;EX01&amp;quot;.&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;Ülesanne tuleb laadida git repositooriumisse kausta &amp;quot;EX01&amp;quot;.&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;== Testimine ==&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;Ülesanne on testitav alates esmaspäevast (ehk siis soovitatav on laadida oma lahendus esmaspäeval üles, et saada tagasisidet).&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;/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;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;== Ülesande hindamine ==&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;== Ülesande hindamine ==&lt;/div&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-2015:harjutus_01&amp;diff=1394&amp;oldid=prev</id>
		<title>Ago: Uus lehekülg: &#039;Harjutuse tähtaeg on &#039;&#039;&#039;3. praktikum&#039;&#039;&#039;, mis toimub &#039;&#039;&#039;10.-11. veebruaril&#039;&#039;&#039;.  == Kirjeldus ==  Kirjutada funktsioon, mis leiab ruutvõrrandi lahendi. Ruutvõrrand on kujul &lt;cod...&#039;</title>
		<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=ITI0011-2015:harjutus_01&amp;diff=1394&amp;oldid=prev"/>
		<updated>2015-02-05T08:39:55Z</updated>

		<summary type="html">&lt;p&gt;Uus lehekülg: &amp;#039;Harjutuse tähtaeg on &amp;#039;&amp;#039;&amp;#039;3. praktikum&amp;#039;&amp;#039;&amp;#039;, mis toimub &amp;#039;&amp;#039;&amp;#039;10.-11. veebruaril&amp;#039;&amp;#039;&amp;#039;.  == Kirjeldus ==  Kirjutada funktsioon, mis leiab ruutvõrrandi lahendi. Ruutvõrrand on kujul &amp;lt;cod...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Uus lehekülg&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Harjutuse tähtaeg on &amp;#039;&amp;#039;&amp;#039;3. praktikum&amp;#039;&amp;#039;&amp;#039;, mis toimub &amp;#039;&amp;#039;&amp;#039;10.-11. veebruaril&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Kirjeldus ==&lt;br /&gt;
&lt;br /&gt;
Kirjutada funktsioon, mis leiab ruutvõrrandi lahendi. Ruutvõrrand on kujul &amp;lt;code&amp;gt;a * x^2 + b * x + c = 0&amp;lt;/code&amp;gt;. Sellel võib olla mitu lahendit.&lt;br /&gt;
&lt;br /&gt;
Kui lahendeid on kaks, siis tagastada nende kahe argumendi korrutis. Kui lahendeid on üks, tagastada see lahend. Kui lahendeid pole, tagastada Double.NaN (see on üks konstant).&lt;br /&gt;
&lt;br /&gt;
== Ülesande esitamine ==&lt;br /&gt;
&lt;br /&gt;
Ülesanne tuleb laadida git repositooriumisse kausta &amp;quot;EX01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Ülesande hindamine ==&lt;br /&gt;
&lt;br /&gt;
Ülesande hindamine toimub järgmises praktikumis. Eeldus on see, et lahendus on git&amp;#039;i üles laetud korrektselt.&lt;br /&gt;
&lt;br /&gt;
== Mall ==&lt;br /&gt;
&lt;br /&gt;
Etteantud mall, mida peaksite kasutama selle ülesande jaoks:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Home assignment 01.&lt;br /&gt;
 */&lt;br /&gt;
public class Task01 {&lt;br /&gt;
    /**&lt;br /&gt;
     * Function that solves an quadratic equation (a*x^2 + b*x + c = 0).&lt;br /&gt;
     * @param a A squared variable held constant (a*x^2).&lt;br /&gt;
     * @param b A variable held constant (b*x).&lt;br /&gt;
     * @param c An absolute term (c).&lt;br /&gt;
     * @return If equation has 2 roots (x1 and x2), returns the product of them (x1 * x2);&lt;br /&gt;
     *         If equation has 1 root (x), returns it (x);&lt;br /&gt;
     *         If equation has no roots, returns Double.NaN.&lt;br /&gt;
     */&lt;br /&gt;
    public static double solveQuadraticEquation(double a, double b, double c) {&lt;br /&gt;
&lt;br /&gt;
        //Calculate the discriminant and initialize d variable.&lt;br /&gt;
        double d = -1.0;&lt;br /&gt;
&lt;br /&gt;
        //TODO: add your code here.&lt;br /&gt;
&lt;br /&gt;
        if (d &amp;gt; 0.0) {&lt;br /&gt;
            //Calculate the roots and initialize x1 and x2.&lt;br /&gt;
            double x1 = 0, x2 = 0;&lt;br /&gt;
&lt;br /&gt;
            //TODO: add your code here.&lt;br /&gt;
&lt;br /&gt;
            return x1 * x2;&lt;br /&gt;
        } else if (d == 0.0) {&lt;br /&gt;
            //Calculate the root and initialize x.&lt;br /&gt;
            double x = 0;&lt;br /&gt;
&lt;br /&gt;
            //TODO: add your code here.&lt;br /&gt;
&lt;br /&gt;
            return x;&lt;br /&gt;
        } else {&lt;br /&gt;
            //Initialize variable x with Double.NaN.&lt;br /&gt;
            double x = 0;&lt;br /&gt;
&lt;br /&gt;
            //TODO: add your code here.&lt;br /&gt;
&lt;br /&gt;
            return x;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Entry-point of the program.&lt;br /&gt;
     * This is here so you can test out your code&lt;br /&gt;
     * with running this program.&lt;br /&gt;
     * @param args Arguments from command-line.&lt;br /&gt;
     */&lt;br /&gt;
    public static void main(String[] args) {&lt;br /&gt;
    	System.out.println(&amp;quot;a = 1, b = -5, c = 6:&amp;quot; &lt;br /&gt;
    			+ solveQuadraticEquation(1.0, -5.0, 6.0));&lt;br /&gt;
    	// should be 6&lt;br /&gt;
    	// add some more tests here if needed.&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ago</name></author>
	</entry>
</feed>