<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki.freitagsrunde.org/index.php?action=history&amp;feed=atom&amp;title=Javakurs%2F%C3%9Cbungsaufgaben%2FOOPStateCharts</id>
	<title>Javakurs/Übungsaufgaben/OOPStateCharts - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.freitagsrunde.org/index.php?action=history&amp;feed=atom&amp;title=Javakurs%2F%C3%9Cbungsaufgaben%2FOOPStateCharts"/>
	<link rel="alternate" type="text/html" href="https://wiki.freitagsrunde.org/index.php?title=Javakurs/%C3%9Cbungsaufgaben/OOPStateCharts&amp;action=history"/>
	<updated>2026-05-19T00:54:06Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in FreitagsrundenWiki</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.freitagsrunde.org/index.php?title=Javakurs/%C3%9Cbungsaufgaben/OOPStateCharts&amp;diff=15828&amp;oldid=prev</id>
		<title>130.149.17.34: /* Aufgabenstellung */</title>
		<link rel="alternate" type="text/html" href="https://wiki.freitagsrunde.org/index.php?title=Javakurs/%C3%9Cbungsaufgaben/OOPStateCharts&amp;diff=15828&amp;oldid=prev"/>
		<updated>2011-03-22T10:12:06Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Aufgabenstellung&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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: #222; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Version vom 22. März 2011, 10:12 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-l1&quot; &gt;Zeile 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;= Aufgabenstellung = &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;= Aufgabenstellung = &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;[[Bild:OOPStatechart.png|thumb|Javakurs 2011 - StateChart]]&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;[[Bild:OOPStatechart.png|thumb|Javakurs 2011 - StateChart]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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 ein Programm, welches &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in objektorientierter Weise, &lt;/del&gt;das hier gezeigte &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Diagramm als &lt;/del&gt;[http://de.wikipedia.org/wiki/Zustands%C3%BCbergangsdiagramm StateChart] erzeugt.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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 ein Programm, welches das hier gezeigte [http://de.wikipedia.org/wiki/Zustands%C3%BCbergangsdiagramm StateChart]&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;-Diagramm in objektorientierter Weise &lt;/ins&gt;erzeugt.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;= Hilfestellung = &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;= Hilfestellung = &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff::1.12:old-15824:rev-15828 --&gt;
&lt;/table&gt;</summary>
		<author><name>130.149.17.34</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.freitagsrunde.org/index.php?title=Javakurs/%C3%9Cbungsaufgaben/OOPStateCharts&amp;diff=15824&amp;oldid=prev</id>
		<title>130.149.17.34: /* Aufgabenstellung */</title>
		<link rel="alternate" type="text/html" href="https://wiki.freitagsrunde.org/index.php?title=Javakurs/%C3%9Cbungsaufgaben/OOPStateCharts&amp;diff=15824&amp;oldid=prev"/>
		<updated>2011-03-22T10:02:41Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Aufgabenstellung&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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: #222; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Version vom 22. März 2011, 10:02 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-l1&quot; &gt;Zeile 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;= Aufgabenstellung = &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;= Aufgabenstellung = &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;[[Bild:OOPStatechart.png|thumb|Javakurs 2011 - StateChart]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;[[Bild:OOPStatechart.png|thumb|Javakurs 2011 - StateChart]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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 ein Programm, welches in &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;objekt orientierter &lt;/del&gt;Weise, das hier gezeigte Diagramm als [http://de.wikipedia.org/wiki/Zustands%C3%BCbergangsdiagramm StateChart] erzeugt.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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 ein Programm, welches in &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;objektorientierter &lt;/ins&gt;Weise, das hier gezeigte Diagramm als [http://de.wikipedia.org/wiki/Zustands%C3%BCbergangsdiagramm StateChart] erzeugt.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;= Hilfestellung = &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;= Hilfestellung = &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff::1.12:old-15749:rev-15824 --&gt;
&lt;/table&gt;</summary>
		<author><name>130.149.17.34</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.freitagsrunde.org/index.php?title=Javakurs/%C3%9Cbungsaufgaben/OOPStateCharts&amp;diff=15749&amp;oldid=prev</id>
		<title>Mario: Statechart aufgabe</title>
		<link rel="alternate" type="text/html" href="https://wiki.freitagsrunde.org/index.php?title=Javakurs/%C3%9Cbungsaufgaben/OOPStateCharts&amp;diff=15749&amp;oldid=prev"/>
		<updated>2011-03-10T23:54:29Z</updated>

		<summary type="html">&lt;p&gt;Statechart aufgabe&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Aufgabenstellung = &lt;br /&gt;
[[Bild:OOPStatechart.png|thumb|Javakurs 2011 - StateChart]].&lt;br /&gt;
Schreibe ein Programm, welches in objekt orientierter Weise, das hier gezeigte Diagramm als [http://de.wikipedia.org/wiki/Zustands%C3%BCbergangsdiagramm StateChart] erzeugt.&lt;br /&gt;
&lt;br /&gt;
= Hilfestellung = &lt;br /&gt;
&lt;br /&gt;
Benutze die folgende Klasse als Basis für alle weiteren Zustände:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/**&lt;br /&gt;
 * Base Class for all states&lt;br /&gt;
 */&lt;br /&gt;
class State {&lt;br /&gt;
	// ! returns a new state, if transition is correct&lt;br /&gt;
	public State transition(String signal) {&lt;br /&gt;
		return this;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wobei jeder Aufruf von transition entweder das gleiche Objekt (''this'') oder ein neues Objekt zurückliefert, je nach dem, ob ein Statusübergang statt findet, oder nicht. Die ''main''-Methode könnte dann wie folgt aussehen:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/**&lt;br /&gt;
 * Class file starting main loop&lt;br /&gt;
 */&lt;br /&gt;
public class StateCharts {&lt;br /&gt;
	/**&lt;br /&gt;
	 * Main class, creating the state chart&lt;br /&gt;
	 * &lt;br /&gt;
	 * @param args&lt;br /&gt;
	 * @throws IOException&lt;br /&gt;
	 */&lt;br /&gt;
	public static void main(String[] args) throws IOException {&lt;br /&gt;
		// set the state chart to be initial at state initial&lt;br /&gt;
		State current_state = new InitialState();&lt;br /&gt;
&lt;br /&gt;
		// loop through the state till exit is reached&lt;br /&gt;
		while (current_state != null) {&lt;br /&gt;
			// print information about current class&lt;br /&gt;
			System.out.println(&amp;quot;Current state: &amp;quot;&lt;br /&gt;
					+ current_state.getClass().getName());&lt;br /&gt;
&lt;br /&gt;
			// get signal for next state&lt;br /&gt;
			System.out.print(&amp;quot;signal to be send: &amp;quot;);&lt;br /&gt;
			InputStreamReader input = new InputStreamReader(System.in);&lt;br /&gt;
			BufferedReader reader = new BufferedReader(input);&lt;br /&gt;
			String signal = reader.readLine();&lt;br /&gt;
&lt;br /&gt;
			// get next state if needed&lt;br /&gt;
			current_state = current_state.transition(signal);&lt;br /&gt;
			System.out.println();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// inform user&lt;br /&gt;
		System.out.println(&amp;quot;StateChart is at end state.&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mario</name></author>
		
	</entry>
</feed>