<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki.stageing.freitagsrunde.org//index.php?action=history&amp;feed=atom&amp;title=Javakurs%2F%C3%9Cbungsaufgaben%2FKassenbon%2B%2B</id>
	<title>Javakurs/Übungsaufgaben/Kassenbon++ - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.stageing.freitagsrunde.org//index.php?action=history&amp;feed=atom&amp;title=Javakurs%2F%C3%9Cbungsaufgaben%2FKassenbon%2B%2B"/>
	<link rel="alternate" type="text/html" href="wiki.stageing.freitagsrunde.org//index.php?title=Javakurs/%C3%9Cbungsaufgaben/Kassenbon%2B%2B&amp;action=history"/>
	<updated>2026-11-02T19:34:14Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in FreitagsrundenWiki</subtitle>
	<generator>MediaWiki 1.45.6</generator>
	<entry>
		<id>wiki.stageing.freitagsrunde.org//index.php?title=Javakurs/%C3%9Cbungsaufgaben/Kassenbon%2B%2B&amp;diff=20686&amp;oldid=prev</id>
		<title>141.23.73.201: /* Vorgabe */</title>
		<link rel="alternate" type="text/html" href="wiki.stageing.freitagsrunde.org//index.php?title=Javakurs/%C3%9Cbungsaufgaben/Kassenbon%2B%2B&amp;diff=20686&amp;oldid=prev"/>
		<updated>2013-03-07T09:46:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Vorgabe&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&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;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 7. März 2013, 09:46 Uhr&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-l34&quot;&gt;Zeile 34:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 34:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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=&quot;diff-marker&quot;&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=&quot;diff-marker&quot;&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;║ FreitagsrundenShop 042 ║&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;║ FreitagsrundenShop 042 ║&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  Franklinstr&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;28/29   &lt;/del&gt;║&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;       Marchstr&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;23    &lt;/ins&gt;║&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;║       10587 Berlin     ║&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;║       10587 Berlin     ║&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;║     ☏ 030 314 213 86   ║&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;║     ☏ 030 314 213 86   ║&lt;/div&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-l53&quot;&gt;Zeile 53:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 53:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;= Aufgabe =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;= Aufgabe =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>141.23.73.201</name></author>
	</entry>
	<entry>
		<id>wiki.stageing.freitagsrunde.org//index.php?title=Javakurs/%C3%9Cbungsaufgaben/Kassenbon%2B%2B&amp;diff=20064&amp;oldid=prev</id>
		<title>Alibaba: /* Aufgabe */</title>
		<link rel="alternate" type="text/html" href="wiki.stageing.freitagsrunde.org//index.php?title=Javakurs/%C3%9Cbungsaufgaben/Kassenbon%2B%2B&amp;diff=20064&amp;oldid=prev"/>
		<updated>2013-03-02T18:56:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Aufgabe&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&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;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 2. März 2013, 18:56 Uhr&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-l62&quot;&gt;Zeile 62:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 62:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;* Schreibe eine Klasse &amp;#039;&amp;#039;&amp;#039;Receipt&amp;#039;&amp;#039;&amp;#039;, die alle gekauften Gegenstände aufnimmt.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;* Schreibe eine Klasse &amp;#039;&amp;#039;&amp;#039;Receipt&amp;#039;&amp;#039;&amp;#039;, die alle gekauften Gegenstände aufnimmt.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;** Füge einen &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;no-argument-&amp;#039;&amp;#039;Konstruktor&amp;#039;&amp;#039;&amp;#039; hinzu&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;** Füge einen &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;no-argument-&amp;#039;&amp;#039;Konstruktor&amp;#039;&amp;#039;&amp;#039; hinzu&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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;** Als einzige Eigenschaft brauchst du hier einen dynamischen Speicher, der beliebig viele Objekte aufnehmen kann. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Am besten &lt;/del&gt;die &#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Vector&lt;/del&gt;&#039;&#039;&#039;-Klasse aus der &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;JavaAPI&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;** Als einzige Eigenschaft brauchst du hier einen dynamischen Speicher, der beliebig viele Objekte aufnehmen kann. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Zum Beispiel &lt;/ins&gt;die &#039;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ArrayList&lt;/ins&gt;&#039;&#039;&#039;-Klasse aus der &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Java Collections API&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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;*** Schau dir dazu die [http://download.oracle.com/javase/6/docs/api/java/util/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Vector&lt;/del&gt;.html Dokumentation von &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Vector &lt;/del&gt;in der Java6 API] an.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;*** Schau dir dazu die [http://download.oracle.com/javase/6/docs/api/java/util/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ArrayList&lt;/ins&gt;.html Dokumentation von &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ArrayList &lt;/ins&gt;in der Java6 API] an.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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;*** Als Typ brauchst du dann &#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Vector&lt;/del&gt;&amp;lt;ReceiptItem&amp;gt;&#039;&#039;&#039;  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;*** Als Typ brauchst du dann &#039;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ArrayList&lt;/ins&gt;&amp;lt;ReceiptItem&amp;gt;&#039;&#039;&#039; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Eine Liste&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;die nur Werte vom Typ ReceiptItem aufnehmen kann. Wenn du mehr über diese Art von Typen wissen möchtest&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;dann befrage eine Suchmaschine &lt;/ins&gt;oder einen Tutor &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nach dem Stichwort &#039;&#039;&#039;Generics&#039;&#039;&#039;&lt;/ins&gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;***:&lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Was genau dies bedeutet&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ist erstmal egal&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;dass kannst du dir später selbst aneigenen &lt;/del&gt;oder &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jetzt &lt;/del&gt;einen Tutor &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;fragen&lt;/del&gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;*** Wichtig ist die Methode &#039;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;List&lt;/ins&gt;.add()&#039;&#039;&#039;, welche ein Objekt anfügt.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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;*** Wichtig ist die Methode &#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Vector&lt;/del&gt;.add(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;..&lt;/del&gt;)&#039;&#039;&#039;, welche ein Objekt anfügt.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;** Schreibe dir auch noch eine Methode &amp;#039;&amp;#039;&amp;#039;print&amp;#039;&amp;#039;&amp;#039;, die alle Elemente des Vectors ausgibt.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;** Schreibe dir auch noch eine Methode &amp;#039;&amp;#039;&amp;#039;print&amp;#039;&amp;#039;&amp;#039;, die alle Elemente des Vectors ausgibt.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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;pre&amp;gt;for( ReceiptItem item : &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;VECTOR &lt;/del&gt;){ }&amp;lt;/pre&amp;gt; gibt dir innerhalb der Schleife in der Variable &#039;&#039;item&#039;&#039; alle Elemente zurück, wenn du für &#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;VECTOR&lt;/del&gt;&#039;&#039;&#039; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;deinen &lt;/del&gt;Variable vom Typ &#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Vector&lt;/del&gt;&#039;&#039; von oben angibst.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;pre&amp;gt;for( ReceiptItem item : &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;aList &lt;/ins&gt;){ }&amp;lt;/pre&amp;gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ist eine spezielle Form der for-Schleife (foreach) und &lt;/ins&gt;gibt dir innerhalb der Schleife in der Variable &#039;&#039;item&#039;&#039; alle Elemente zurück, wenn du für &#039;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;aList&lt;/ins&gt;&#039;&#039;&#039; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;deine &lt;/ins&gt;Variable vom Typ &#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;List&lt;/ins&gt;&#039;&#039; von oben angibst.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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;* Schreibe des Weiteren eine Klasse &#039;&#039;&#039;ReceiptItem&#039;&#039;&#039; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;welche nacher zu der &#039;&#039;&#039;Receipt&#039;&#039;&#039;-Klasse hinzugefügt werden wird&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;* Schreibe des Weiteren eine Klasse &#039;&#039;&#039;ReceiptItem&#039;&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;** Diese braucht alle &amp;#039;&amp;#039;&amp;#039;Eigenschaften&amp;#039;&amp;#039;&amp;#039; eines Rechnungsgegenstandes, also &amp;#039;&amp;#039;Name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;Preis&amp;#039;&amp;#039;(pro Einheit) und &amp;#039;&amp;#039;Anzahl&amp;#039;&amp;#039;(der Einheiten)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;** Diese braucht alle &amp;#039;&amp;#039;&amp;#039;Eigenschaften&amp;#039;&amp;#039;&amp;#039; eines Rechnungsgegenstandes, also &amp;#039;&amp;#039;Name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;Preis&amp;#039;&amp;#039;(pro Einheit) und &amp;#039;&amp;#039;Anzahl&amp;#039;&amp;#039;(der Einheiten)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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;** Stelle sicher, dass die Eigenschaften nur innerhalb der Klasse verändert werden können (&#039;&#039;&#039;public&#039;&#039;&#039; vs. &#039;&#039;&#039;private&#039;&#039;&#039; vs. &#039;&#039;&#039;protected&#039;&#039;&#039;, welches ist hier richtig, warum?)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;** Stelle sicher, dass die Eigenschaften nur innerhalb der Klasse verändert werden können (&#039;&#039;&#039;public&#039;&#039;&#039; vs. &#039;&#039;&#039;private&#039;&#039;&#039; vs. &#039;&#039;&#039;protected&#039;&#039;&#039;, welches ist hier richtig&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;?&lt;/ins&gt;, warum?)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;** Schreibe für jede Eigenschaft einen &amp;#039;&amp;#039;&amp;#039;getter&amp;#039;&amp;#039;&amp;#039; und einen &amp;#039;&amp;#039;&amp;#039;setter&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;** Schreibe für jede Eigenschaft einen &amp;#039;&amp;#039;&amp;#039;getter&amp;#039;&amp;#039;&amp;#039; und einen &amp;#039;&amp;#039;&amp;#039;setter&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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;** Denke dran, bei den &#039;&#039;&#039;setter&#039;&#039;&#039;-Methoden die Eingabewerte zu überprüfen, damit du bspw. keine negativen &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;anzahlen &lt;/del&gt;für Gegenstände angeben kannst&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;** Denke dran, bei den &#039;&#039;&#039;setter&#039;&#039;&#039;-Methoden die Eingabewerte zu überprüfen, damit du bspw. keine negativen &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Anzahlen &lt;/ins&gt;für Gegenstände angeben kannst&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 class=&quot;diff-marker&quot;&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;** Erstelle letzlich auch einen &amp;#039;&amp;#039;&amp;#039;Konstruktor&amp;#039;&amp;#039;&amp;#039; mit allen drei &amp;#039;&amp;#039;&amp;#039;Eigenschaften&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;** Erstelle letzlich auch einen &amp;#039;&amp;#039;&amp;#039;Konstruktor&amp;#039;&amp;#039;&amp;#039; mit allen drei &amp;#039;&amp;#039;&amp;#039;Eigenschaften&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Alibaba</name></author>
	</entry>
	<entry>
		<id>wiki.stageing.freitagsrunde.org//index.php?title=Javakurs/%C3%9Cbungsaufgaben/Kassenbon%2B%2B&amp;diff=20063&amp;oldid=prev</id>
		<title>Alibaba: default-Konstruktoren kann man nicht hinzufügen ...</title>
		<link rel="alternate" type="text/html" href="wiki.stageing.freitagsrunde.org//index.php?title=Javakurs/%C3%9Cbungsaufgaben/Kassenbon%2B%2B&amp;diff=20063&amp;oldid=prev"/>
		<updated>2013-03-02T18:40:19Z</updated>

		<summary type="html">&lt;p&gt;default-Konstruktoren kann man nicht hinzufügen ...&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&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;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 2. März 2013, 18:40 Uhr&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-l61&quot;&gt;Zeile 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 61:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;Das heißt:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;Das heißt:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;* Schreibe eine Klasse &amp;#039;&amp;#039;&amp;#039;Receipt&amp;#039;&amp;#039;&amp;#039;, die alle gekauften Gegenstände aufnimmt.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;* Schreibe eine Klasse &amp;#039;&amp;#039;&amp;#039;Receipt&amp;#039;&amp;#039;&amp;#039;, die alle gekauften Gegenstände aufnimmt.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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;** Füge einen &#039;&#039;&#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;default&lt;/del&gt;-&#039;&#039;Konstruktor&#039;&#039;&#039; hinzu&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;** Füge einen &#039;&#039;&#039;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;no-argument&lt;/ins&gt;-&#039;&#039;Konstruktor&#039;&#039;&#039; hinzu&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;** Als einzige Eigenschaft brauchst du hier einen dynamischen Speicher, der beliebig viele Objekte aufnehmen kann. Am besten die &amp;#039;&amp;#039;&amp;#039;Vector&amp;#039;&amp;#039;&amp;#039;-Klasse aus der JavaAPI.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;** Als einzige Eigenschaft brauchst du hier einen dynamischen Speicher, der beliebig viele Objekte aufnehmen kann. Am besten die &amp;#039;&amp;#039;&amp;#039;Vector&amp;#039;&amp;#039;&amp;#039;-Klasse aus der JavaAPI.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;*** Schau dir dazu die [http://download.oracle.com/javase/6/docs/api/java/util/Vector.html Dokumentation von Vector in der Java6 API] an.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;*** Schau dir dazu die [http://download.oracle.com/javase/6/docs/api/java/util/Vector.html Dokumentation von Vector in der Java6 API] an.  &lt;/div&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-l75&quot;&gt;Zeile 75:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 75:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;** Denke dran, bei den &amp;#039;&amp;#039;&amp;#039;setter&amp;#039;&amp;#039;&amp;#039;-Methoden die Eingabewerte zu überprüfen, damit du bspw. keine negativen anzahlen für Gegenstände angeben kannst&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;** Denke dran, bei den &amp;#039;&amp;#039;&amp;#039;setter&amp;#039;&amp;#039;&amp;#039;-Methoden die Eingabewerte zu überprüfen, damit du bspw. keine negativen anzahlen für Gegenstände angeben kannst&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;** Erstelle letzlich auch einen &amp;#039;&amp;#039;&amp;#039;Konstruktor&amp;#039;&amp;#039;&amp;#039; mit allen drei &amp;#039;&amp;#039;&amp;#039;Eigenschaften&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;** Erstelle letzlich auch einen &amp;#039;&amp;#039;&amp;#039;Konstruktor&amp;#039;&amp;#039;&amp;#039; mit allen drei &amp;#039;&amp;#039;&amp;#039;Eigenschaften&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;= Abschluss =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;= Abschluss =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Alibaba</name></author>
	</entry>
	<entry>
		<id>wiki.stageing.freitagsrunde.org//index.php?title=Javakurs/%C3%9Cbungsaufgaben/Kassenbon%2B%2B&amp;diff=15695&amp;oldid=prev</id>
		<title>Mario: Neue Aufgabe</title>
		<link rel="alternate" type="text/html" href="wiki.stageing.freitagsrunde.org//index.php?title=Javakurs/%C3%9Cbungsaufgaben/Kassenbon%2B%2B&amp;diff=15695&amp;oldid=prev"/>
		<updated>2011-02-26T11:51:09Z</updated>

		<summary type="html">&lt;p&gt;Neue Aufgabe&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Diese Aufgabe wird dir zeigen, wie man die Aufgabe [[Javakurs/Übungsaufgaben/Kassenbon]] via Kapselung löst.&lt;br /&gt;
&lt;br /&gt;
= Vorgabe =&lt;br /&gt;
Folgender Code könnte als Einstiegspunkt für einen Objektorientierten Kassebon dienen. Dabei sollen mehrere Klassen miteinander interagieren: &amp;#039;&amp;#039;&amp;#039;Receipt&amp;#039;&amp;#039;&amp;#039; (der eigentliche Kassenbon) und &amp;#039;&amp;#039;&amp;#039;ReceiptItem&amp;#039;&amp;#039;&amp;#039;(ein Eintrag in dem Kassenbon). Am Anfang der &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039;-Methode wird der Kassebon erstellt. Dannach werden vier Einträge an den Bon angefügt und letzlich der Bon ausgegeben. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Main class for Receipt++&lt;br /&gt;
 *&lt;br /&gt;
 * @author Mario&lt;br /&gt;
 */&lt;br /&gt;
public class Main {&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * This method will start all sub tests defined.&lt;br /&gt;
	 */&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
		// buy some items and create a receipt for it&lt;br /&gt;
		Receipt r = new Receipt();		&lt;br /&gt;
		r.add( new ReceiptItem(&amp;quot;15 Fischstäbchen&amp;quot;, 3, 1.79) );&lt;br /&gt;
		r.add( new ReceiptItem(&amp;quot;Steaks&amp;quot;, 5, 3.99) );&lt;br /&gt;
		r.add( new ReceiptItem(&amp;quot;Naturelle (1l)&amp;quot;, 6, 4.99) );&lt;br /&gt;
		r.add( new ReceiptItem(&amp;quot;Magnum Eis Creme&amp;quot;, 2, 2.99) );&lt;br /&gt;
		&lt;br /&gt;
		// output receipt in a linear fashion&lt;br /&gt;
		r.print();&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Folgendes könnte die Ausgabe sein:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
╔════════════════════════╗&lt;br /&gt;
║ FreitagsrundenShop 042 ║&lt;br /&gt;
║   Franklinstr. 28/29   ║&lt;br /&gt;
║       10587 Berlin     ║&lt;br /&gt;
║     ☏ 030 314 213 86   ║&lt;br /&gt;
╚════════════════════════╝&lt;br /&gt;
&lt;br /&gt;
15 Fischstäbchen         &lt;br /&gt;
  3x                  1.79&lt;br /&gt;
Steaks                   &lt;br /&gt;
  5x                  3.99&lt;br /&gt;
Naturelle (1l)           &lt;br /&gt;
  6x                  4.99&lt;br /&gt;
Magnum Eis Creme         &lt;br /&gt;
  2x                  2.99&lt;br /&gt;
&lt;br /&gt;
                     =====&lt;br /&gt;
Summe EUR            61.24&lt;br /&gt;
                     =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Aufgabe =&lt;br /&gt;
&lt;br /&gt;
Sobald du die Idee der &amp;#039;&amp;#039;&amp;#039;Vorgabe&amp;#039;&amp;#039;&amp;#039; verstanden hast, solltest du dir folgende Aufgaben ansehen, damit du lauffähigen Code erzeugst:&lt;br /&gt;
&lt;br /&gt;
Das heißt:&lt;br /&gt;
* Schreibe eine Klasse &amp;#039;&amp;#039;&amp;#039;Receipt&amp;#039;&amp;#039;&amp;#039;, die alle gekauften Gegenstände aufnimmt.&lt;br /&gt;
** Füge einen &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;default-&amp;#039;&amp;#039;Konstruktor&amp;#039;&amp;#039;&amp;#039; hinzu&lt;br /&gt;
** Als einzige Eigenschaft brauchst du hier einen dynamischen Speicher, der beliebig viele Objekte aufnehmen kann. Am besten die &amp;#039;&amp;#039;&amp;#039;Vector&amp;#039;&amp;#039;&amp;#039;-Klasse aus der JavaAPI.&lt;br /&gt;
*** Schau dir dazu die [http://download.oracle.com/javase/6/docs/api/java/util/Vector.html Dokumentation von Vector in der Java6 API] an. &lt;br /&gt;
*** Als Typ brauchst du dann &amp;#039;&amp;#039;&amp;#039;Vector&amp;lt;ReceiptItem&amp;gt;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
***:(Was genau dies bedeutet, ist erstmal egal, dass kannst du dir später selbst aneigenen oder jetzt einen Tutor fragen)&lt;br /&gt;
*** Wichtig ist die Methode &amp;#039;&amp;#039;&amp;#039;Vector.add(..)&amp;#039;&amp;#039;&amp;#039;, welche ein Objekt anfügt.&lt;br /&gt;
** Schreibe dir auch noch eine Methode &amp;#039;&amp;#039;&amp;#039;print&amp;#039;&amp;#039;&amp;#039;, die alle Elemente des Vectors ausgibt.&lt;br /&gt;
**: &amp;lt;pre&amp;gt;for( ReceiptItem item : VECTOR ){ }&amp;lt;/pre&amp;gt; gibt dir innerhalb der Schleife in der Variable &amp;#039;&amp;#039;item&amp;#039;&amp;#039; alle Elemente zurück, wenn du für &amp;#039;&amp;#039;&amp;#039;VECTOR&amp;#039;&amp;#039;&amp;#039; deinen Variable vom Typ &amp;#039;&amp;#039;Vector&amp;#039;&amp;#039; von oben angibst.&lt;br /&gt;
* Schreibe des Weiteren eine Klasse &amp;#039;&amp;#039;&amp;#039;ReceiptItem&amp;#039;&amp;#039;&amp;#039; welche nacher zu der &amp;#039;&amp;#039;&amp;#039;Receipt&amp;#039;&amp;#039;&amp;#039;-Klasse hinzugefügt werden wird.&lt;br /&gt;
** Diese braucht alle &amp;#039;&amp;#039;&amp;#039;Eigenschaften&amp;#039;&amp;#039;&amp;#039; eines Rechnungsgegenstandes, also &amp;#039;&amp;#039;Name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;Preis&amp;#039;&amp;#039;(pro Einheit) und &amp;#039;&amp;#039;Anzahl&amp;#039;&amp;#039;(der Einheiten)&lt;br /&gt;
** Stelle sicher, dass die Eigenschaften nur innerhalb der Klasse verändert werden können (&amp;#039;&amp;#039;&amp;#039;public&amp;#039;&amp;#039;&amp;#039; vs. &amp;#039;&amp;#039;&amp;#039;private&amp;#039;&amp;#039;&amp;#039; vs. &amp;#039;&amp;#039;&amp;#039;protected&amp;#039;&amp;#039;&amp;#039;, welches ist hier richtig, warum?)&lt;br /&gt;
** Schreibe für jede Eigenschaft einen &amp;#039;&amp;#039;&amp;#039;getter&amp;#039;&amp;#039;&amp;#039; und einen &amp;#039;&amp;#039;&amp;#039;setter&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Denke dran, bei den &amp;#039;&amp;#039;&amp;#039;setter&amp;#039;&amp;#039;&amp;#039;-Methoden die Eingabewerte zu überprüfen, damit du bspw. keine negativen anzahlen für Gegenstände angeben kannst&lt;br /&gt;
** Erstelle letzlich auch einen &amp;#039;&amp;#039;&amp;#039;Konstruktor&amp;#039;&amp;#039;&amp;#039; mit allen drei &amp;#039;&amp;#039;&amp;#039;Eigenschaften&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Abschluss =&lt;br /&gt;
&lt;br /&gt;
Teste nun, ob deine Implementierung den Vorgaben entspricht. &lt;br /&gt;
&lt;br /&gt;
Auch ist zu empfehlen jetzt noch etwas mit dem Code zu &amp;#039;&amp;#039;spielen&amp;#039;&amp;#039;. Folgende Aufgaben sind nur als Anregung gedacht, und werden ohne Musterlösung gegeben:&lt;br /&gt;
* füge weitere Objekte ein&lt;br /&gt;
* versuche die Kapselung zu brechen (Negative Preise, Leere Namen, ...). &lt;br /&gt;
* Brieftaschen Aufgabe lösen: Was müsstest du tun, um eine Rechnung zu erstellen, die möglichst genau einen gegebenen Betrag kostet.&lt;/div&gt;</summary>
		<author><name>Mario</name></author>
	</entry>
</feed>