07.10.2013 Aufrufe

34-analysis-dynamic - Lehrstuhl Softwaretechnologie

34-analysis-dynamic - Lehrstuhl Softwaretechnologie

34-analysis-dynamic - Lehrstuhl Softwaretechnologie

MEHR ANZEIGEN
WENIGER ANZEIGEN

Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.

YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.

Implementierung mit IntegerState<br />

class Clock {<br />

}<br />

private int time = 0;<br />

private static final int NORMAL = 0;<br />

private static final int SETTING = 1;<br />

private int state = NORMAL;<br />

public void set () {<br />

switch (mode) {<br />

case NORMAL: {<br />

break;<br />

};<br />

case SETTING: {<br />

time = 0;<br />

setChanged();<br />

break;<br />

};<br />

};<br />

}<br />

...// analog tick(), mode()<br />

Prof. Uwe Aßmann, <strong>Softwaretechnologie</strong><br />

40

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!