<?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_10_lihtsam</id>
	<title>ITI0011-2016:harjutus 10 lihtsam - 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_10_lihtsam"/>
	<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=ITI0011-2016:harjutus_10_lihtsam&amp;action=history"/>
	<updated>2026-05-21T21:08:28Z</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_10_lihtsam&amp;diff=4314&amp;oldid=prev</id>
		<title>Ago: /* Üldine */</title>
		<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=ITI0011-2016:harjutus_10_lihtsam&amp;diff=4314&amp;oldid=prev"/>
		<updated>2016-03-19T04:34:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Üldine&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: 19. märts 2016, kell 04:34&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-l5&quot; &gt;5. rida:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;5. 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;Kaust gitis: EX10A&amp;lt;br /&amp;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;Kaust gitis: EX10A&amp;lt;br /&amp;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;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See on lihtsam variant harjutus 10st ([[ITI0011:harjutus 10]]&lt;/div&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;See on lihtsam variant harjutus 10st ([[ITI0011:harjutus 10]]&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;)&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;== Ülesanne ==&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 ==&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-2016:harjutus_10_lihtsam&amp;diff=4313&amp;oldid=prev</id>
		<title>Ago – 19. märts 2016, kell 04:34</title>
		<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=ITI0011-2016:harjutus_10_lihtsam&amp;diff=4313&amp;oldid=prev"/>
		<updated>2016-03-19T04:34:19Z</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: 19. märts 2016, kell 04:34&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-l11&quot; &gt;11. rida:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;11. 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;Realiseerida &amp;lt;code&amp;gt;ExpensiveCarShop&amp;lt;/code&amp;gt;, mis implementeerib &amp;lt;code&amp;gt;CarShop&amp;lt;/code&amp;gt; liidest. Realiseeritav funktsionaalsus:&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;Realiseerida &amp;lt;code&amp;gt;ExpensiveCarShop&amp;lt;/code&amp;gt;, mis implementeerib &amp;lt;code&amp;gt;CarShop&amp;lt;/code&amp;gt; liidest. Realiseeritav funktsionaalsus:&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;* auto müümisel pannakse selle hinnale 10% otsa. Ehk kui auto hind on 100 eurot, siis &amp;lt;code&amp;gt;sellCar&amp;lt;/code&amp;gt; selle auto kohta tagastab 110.&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;* auto müümisel pannakse selle hinnale 10% otsa. Ehk kui auto hind on 100 eurot, siis &amp;lt;code&amp;gt;sellCar&amp;lt;/code&amp;gt; selle auto kohta tagastab 110.&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;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;sellCar&amp;lt;/code&amp;gt; tagastab suvalise auto nimetatud mudeliga. Kui mudel on &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;, siis tagastab &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;suvalise auto&lt;/del&gt;.&lt;/div&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;* &amp;lt;code&amp;gt;sellCar&amp;lt;/code&amp;gt; tagastab suvalise auto nimetatud mudeliga. Kui mudel on &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;, siis tagastab &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;. Auto müümisel peab selle hind olema 10% kallim (ehk siis objekt, mis tagastatakse, peab olema 10% suurema hinnaga).&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 class=&quot;diffchange diffchange-inline&quot;&gt;* &amp;lt;code&amp;gt;getAmount&amp;lt;/code&amp;gt; tagastab etteantud mudeliga autode koguse poes. Kui etteantud mudel on &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;, siis tagastab kõikide autode koguse&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;/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 colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l32&quot; &gt;32. rida:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;33. 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;      * Car will be removed from the owned cars.&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;      * Car will be removed from the owned cars.&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;      * @param model Car with the specified model is sold.&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;      * @param model Car with the specified model is sold.&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;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      * @return &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The price of the &lt;/del&gt;sold &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;car&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Negative &lt;/del&gt;if no car &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;found.&lt;/del&gt;&lt;/div&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;      * @return &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Car to be &lt;/ins&gt;sold. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Null &lt;/ins&gt;if no car with &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the &lt;/ins&gt;specified model &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;found&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;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;     * Negative if no cars &lt;/del&gt;with specified model &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;exist (out of stock)&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&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;      */&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;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;double &lt;/del&gt;sellCar(String model);&lt;/div&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 class=&quot;diffchange diffchange-inline&quot;&gt;Car &lt;/ins&gt;sellCar(String model);&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;     /**&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;/table&gt;</summary>
		<author><name>Ago</name></author>
	</entry>
	<entry>
		<id>http://courses.cs.taltech.ee/w/index.php?title=ITI0011-2016:harjutus_10_lihtsam&amp;diff=4307&amp;oldid=prev</id>
		<title>Ago: Uus lehekülg: &#039; == Üldine ==  Kaitsmised: 21. - 22. märts&lt;br /&gt; Kaust gitis: EX10A&lt;br /&gt;  See on lihtsam variant harjutus 10st (ITI0011:harjutus 10  == Ülesanne ==  Realiseerida &lt;code&gt;Ex...&#039;</title>
		<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=ITI0011-2016:harjutus_10_lihtsam&amp;diff=4307&amp;oldid=prev"/>
		<updated>2016-03-18T07:00:02Z</updated>

		<summary type="html">&lt;p&gt;Uus lehekülg: &amp;#039; == Üldine ==  Kaitsmised: 21. - 22. märts&amp;lt;br /&amp;gt; Kaust gitis: EX10A&amp;lt;br /&amp;gt;  See on lihtsam variant harjutus 10st (&lt;a href=&quot;/pages/ITI0011:harjutus_10&quot; title=&quot;ITI0011:harjutus 10&quot;&gt;ITI0011:harjutus 10&lt;/a&gt;  == Ülesanne ==  Realiseerida &amp;lt;code&amp;gt;Ex...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Uus lehekülg&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== Üldine ==&lt;br /&gt;
&lt;br /&gt;
Kaitsmised: 21. - 22. märts&amp;lt;br /&amp;gt;&lt;br /&gt;
Kaust gitis: EX10A&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See on lihtsam variant harjutus 10st ([[ITI0011:harjutus 10]]&lt;br /&gt;
&lt;br /&gt;
== Ülesanne ==&lt;br /&gt;
&lt;br /&gt;
Realiseerida &amp;lt;code&amp;gt;ExpensiveCarShop&amp;lt;/code&amp;gt;, mis implementeerib &amp;lt;code&amp;gt;CarShop&amp;lt;/code&amp;gt; liidest. Realiseeritav funktsionaalsus:&lt;br /&gt;
* auto müümisel pannakse selle hinnale 10% otsa. Ehk kui auto hind on 100 eurot, siis &amp;lt;code&amp;gt;sellCar&amp;lt;/code&amp;gt; selle auto kohta tagastab 110.&lt;br /&gt;
* &amp;lt;code&amp;gt;sellCar&amp;lt;/code&amp;gt; tagastab suvalise auto nimetatud mudeliga. Kui mudel on &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;, siis tagastab suvalise auto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mall ==&lt;br /&gt;
&lt;br /&gt;
CarShop.java:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Car shop interface.&lt;br /&gt;
 */&lt;br /&gt;
public interface CarShop {&lt;br /&gt;
    /**&lt;br /&gt;
     * Car shop buys a car. Car will be added to the owned cars.&lt;br /&gt;
     * @param car Car to buy.&lt;br /&gt;
     */&lt;br /&gt;
    void buyCar(Car car);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Car shop sells a car with the specified model.&lt;br /&gt;
     * Car will be removed from the owned cars.&lt;br /&gt;
     * @param model Car with the specified model is sold.&lt;br /&gt;
     * @return The price of the sold car. Negative if no car found.&lt;br /&gt;
     * Negative if no cars with specified model exist (out of stock).&lt;br /&gt;
     */&lt;br /&gt;
    double sellCar(String model);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the amount of cars with specified model. If no cars&lt;br /&gt;
     * with specified model exist, returns 0. If specified model is null,&lt;br /&gt;
     * returns the amount of all the cars.&lt;br /&gt;
     * @param model Model to count. If null, the amount of all the cars is returned.&lt;br /&gt;
     * @return The amount of cars with specified model. If model is null,&lt;br /&gt;
     * total amount of cars.&lt;br /&gt;
     */&lt;br /&gt;
    int getAmount(String model);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Car.java&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Car object which is operated by CarShop.&lt;br /&gt;
 */&lt;br /&gt;
public class Car {&lt;br /&gt;
    /**&lt;br /&gt;
     * Model of the car.&lt;br /&gt;
     */&lt;br /&gt;
    private String model;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Price of the car.&lt;br /&gt;
     */&lt;br /&gt;
    private double price;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Constructor.&lt;br /&gt;
     * @param model Model of the car.&lt;br /&gt;
     * @param price Price of the car.&lt;br /&gt;
     */&lt;br /&gt;
    public Car(String model, double price) {&lt;br /&gt;
        this.model = model;&lt;br /&gt;
        this.price = price;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the price of the car (in euros).&lt;br /&gt;
     *&lt;br /&gt;
     * @return Car price.&lt;br /&gt;
     */&lt;br /&gt;
    public double getPrice() {&lt;br /&gt;
        return price;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Sets the price of the car (in euros).&lt;br /&gt;
     *&lt;br /&gt;
     * @param price Car price.&lt;br /&gt;
     */&lt;br /&gt;
    public void setPrice(double price) {&lt;br /&gt;
        this.price = price;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the model of the car.&lt;br /&gt;
     *&lt;br /&gt;
     * @return Model of the car.&lt;br /&gt;
     */&lt;br /&gt;
    public String getModel() {&lt;br /&gt;
        return model;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Sets the model of the car.&lt;br /&gt;
     *&lt;br /&gt;
     * @param model Model of the car.&lt;br /&gt;
     */&lt;br /&gt;
    public void setModel(String model) {&lt;br /&gt;
        this.model = model;&lt;br /&gt;
    }&lt;br /&gt;
&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>