first
commit
55264c293e
|
@ -0,0 +1,8 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/RobotAbgabe.iml" filepath="$PROJECT_DIR$/RobotAbgabe.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RunConfigurationProducerService">
|
||||||
|
<option name="ignoredProducers">
|
||||||
|
<set>
|
||||||
|
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,124 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Palette2">
|
||||||
|
<group name="Swing">
|
||||||
|
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="Button" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="RadioButton" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="CheckBox" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="Label" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||||
|
<preferred-size width="150" height="-1" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||||
|
<preferred-size width="150" height="-1" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||||
|
<preferred-size width="150" height="-1" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||||
|
<preferred-size width="200" height="200" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||||
|
<preferred-size width="200" height="200" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||||
|
<preferred-size width="-1" height="20" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||||
|
</item>
|
||||||
|
</group>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$USER_HOME$" vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
|
@ -0,0 +1,72 @@
|
||||||
|
import tpe.exceptions.roboter.Robot;
|
||||||
|
import tpe.exceptions.roboter.exceptions.RobotException;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
public class C3PO implements Robot {
|
||||||
|
private int id;
|
||||||
|
private String name;
|
||||||
|
private boolean isPowerOn;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void triggerPowerSwitch() {
|
||||||
|
if(isPowerOn==false){
|
||||||
|
isPowerOn=true;
|
||||||
|
}else{
|
||||||
|
isPowerOn=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPowerOn() {
|
||||||
|
return isPowerOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RobotException getLastException() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String speak(int[] zahlen) throws RobotException {
|
||||||
|
|
||||||
|
var sortiert = think(zahlen);
|
||||||
|
|
||||||
|
return arrayFormatieren(sortiert);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String arrayFormatieren(int[] zahlen){
|
||||||
|
var ergebnis = Arrays.stream(zahlen)
|
||||||
|
.boxed()
|
||||||
|
.map(String::valueOf)
|
||||||
|
.collect(Collectors.joining(";"));
|
||||||
|
return ergebnis;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public int[] think(int[] zahlen) throws RobotException {
|
||||||
|
int n = zahlen.length;
|
||||||
|
for (int i = 1; i < n; ++i) {
|
||||||
|
int key = zahlen[i];
|
||||||
|
int j = i - 1;
|
||||||
|
while (j >= 0 && zahlen[j] > key) {
|
||||||
|
zahlen[j + 1] = zahlen[j];
|
||||||
|
j = j - 1;
|
||||||
|
}
|
||||||
|
zahlen[j + 1] = key;
|
||||||
|
}
|
||||||
|
return zahlen;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
|
||||||
|
/* (c) 2012 Thomas Smits */
|
||||||
|
package tpe.exceptions.roboter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface für Roboter.
|
||||||
|
*
|
||||||
|
* @author Thomas Smits
|
||||||
|
*/
|
||||||
|
public interface Robot extends RobotControl, RobotInstructions {
|
||||||
|
// keine eigenen Methoden
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,75 @@
|
||||||
|
package tpe.exceptions.roboter;
|
||||||
|
|
||||||
|
|
||||||
|
import tpe.exceptions.roboter.exceptions.RobotException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Das Interface repräsentiert einen einfachen Roboter mit seinen Funktionen.
|
||||||
|
* <p>
|
||||||
|
* Jeder produzierte Roboter hat einen Namen, der vom Besteller frei gewählt
|
||||||
|
* werden kann. Der Name bleibt über die gesamte Lebensdauer des Roboters
|
||||||
|
* unveränderlich. Man kann einen Roboter jederzeit über die
|
||||||
|
* <code>getName()</code>-Methode nach seinem Namen fragen.
|
||||||
|
* <p>
|
||||||
|
* Zusätzlich zum frei gewählten Namen, hat jeder Roboter noch eine
|
||||||
|
* Seriennummer. Diese wird bei der Produktion festgelegt und hat einen vom
|
||||||
|
* Roboter-Typ abhängigen Bereich möglicher Werte. Innerhalb des Bereiches wird
|
||||||
|
* die Seriennummer zufällig vergeben. Die Seriennummer kann auch bei
|
||||||
|
* ausgeschalteten Roboter über <code>getId()</code>gelesen werden.
|
||||||
|
* <p>
|
||||||
|
* Ein Roboter hat einen Hauptschalter, der mithilfe der
|
||||||
|
* <code>triggerPowerSwitch()</code>-Methode bedient werden kann. Direkt nach
|
||||||
|
* der Produktion ist der Roboter ausgeschaltet. Drückt man einmal auf den
|
||||||
|
* Schalter, wird er eingeschaltet. Ein weiterer Druck schaltet ihn wieder aus, usw.
|
||||||
|
* <p>
|
||||||
|
* Die aktuelle Position des Hauptschalters kann man mit der Methode
|
||||||
|
* <code>isPowerOn()</code> abfragen. Hierbei bedeutet <code>true</code>, dass
|
||||||
|
* der Roboter eingeschaltet ist und <code>false</code>, dass er nicht
|
||||||
|
* eingeschaltet ist.
|
||||||
|
* <p>
|
||||||
|
* Falls ein Fehler auftritt, kann der Nutzer des Roboters den letzten
|
||||||
|
* aufgetretenen Fehler über eine Blackbox (Fehlerspeicher) auslesen. Dies
|
||||||
|
* geschieht mithilfe der <code>getLastException()</code>-Methode. Der
|
||||||
|
* Fehlerspeicher kann auch bei ausgeschaltetem Roboter benutzt werden. Gab es
|
||||||
|
* noch keinen Fehler, ist der Fehlerspeicher leer (<code>null</code>).
|
||||||
|
* <p>
|
||||||
|
* Alle Methoden dieses Interfaces können auch auf einem Roboter aufgerufen
|
||||||
|
* werden, der ausgeschaltet ist (d.h. wenn <code>isPowerOn()</code> == false).
|
||||||
|
*/
|
||||||
|
public interface RobotControl {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gibt die ID (Seriennummer) des Roboters zurück.
|
||||||
|
*
|
||||||
|
* @return Eine eindeutige Identifikation in Form einer Zahl.
|
||||||
|
*/
|
||||||
|
public int getId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gibt den Namen des Roboter-Exemplars zurück.
|
||||||
|
*
|
||||||
|
* @return Der Name des Roboters.
|
||||||
|
*/
|
||||||
|
public String getName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Betätigen den An-/Ausschaltknopf.
|
||||||
|
*/
|
||||||
|
public void triggerPowerSwitch();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prüft ob der Roboter eingeschaltet ist.
|
||||||
|
*
|
||||||
|
* @return <code>true</code> bedeutet, dass der Roboter eingeschaltet ist,
|
||||||
|
* <code>false</code>, dass er nicht eingeschaltet ist.
|
||||||
|
*/
|
||||||
|
public boolean isPowerOn();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ruft die zuletzt aufgetretene Ausnahme aus der Blackbox ab.
|
||||||
|
*
|
||||||
|
* @return zuletzt aufgetretene Ausnahme oder <code>null</code> falls noch
|
||||||
|
* keine aufgetreten ist.
|
||||||
|
*/
|
||||||
|
public RobotException getLastException();
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
|
||||||
|
package tpe.exceptions.roboter;
|
||||||
|
|
||||||
|
import tpe.exceptions.roboter.exceptions.RobotException;
|
||||||
|
import tpe.exceptions.roboter.exceptions.RobotIllegalStateException;
|
||||||
|
import tpe.exceptions.roboter.exceptions.RobotMagicValueException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Das Interface repräsentiert den Befehlssatz eines einfachen Roboters.
|
||||||
|
*
|
||||||
|
* Jeder Roboter kann zwei grundlegende Operationen durchführen: das Umwandeln
|
||||||
|
* einer Menge von Zahlen in einen String (<code>speak(...)</code>) und das
|
||||||
|
* sortieren eines Arrays von Zahlen (<code>think(...)</code>). Wie genau das
|
||||||
|
* Sortieren oder die Umwandlung erfolgt, hängt vom jeweiligen Typ des Roboters ab.
|
||||||
|
*
|
||||||
|
* Zu beachten ist, dass die Methoden dieses Interfaces nur auf Robotern benutzt
|
||||||
|
* werden können, die eingeschaltet sind. Versucht man sie auf einem
|
||||||
|
* ausgeschalteten Roboter zu benutzen, werfen sie eine {@link RobotIllegalStateException}.
|
||||||
|
*
|
||||||
|
* Weiterhin haben alle Roboter einen kleinen technischen Defekt, der dazu führt
|
||||||
|
* dass die Methoden dieses Interfaces abstürzen, wenn in den Eingabedaten ein
|
||||||
|
* spezieller Wert vorkommt. Immer wenn (<code>speak(...)</code>) oder (
|
||||||
|
* <code>think(...)</code>) mit einem Array aufgerufen werden, das irgendwo die
|
||||||
|
* Zahl {@literal 42} enthält, verweigern sie ihren Dienst und werfen eine
|
||||||
|
* {@link RobotMagicValueException}.
|
||||||
|
*/
|
||||||
|
public interface RobotInstructions {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gibt ein Array von Zahlen als String zurück. Die Zahlen werden
|
||||||
|
* <b>nicht</b> sortiert.
|
||||||
|
*
|
||||||
|
* @param zahlen Zahlen, die ausgegeben werden sollen.
|
||||||
|
* @return Zahlen als String
|
||||||
|
* @throws RobotException wenn der Roboter in einem ungültigen Zustand ist,
|
||||||
|
* oder das Array nicht seinen Vorstellungen entspricht.
|
||||||
|
*/
|
||||||
|
public String speak(int[] zahlen) throws RobotException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sortiert ein Array von Zahlen. Die Reihenfolge hängt von dem Typ des
|
||||||
|
* Roboters ab.
|
||||||
|
*
|
||||||
|
* @param zahlen Zahlen, die sortiert werden sollen.
|
||||||
|
* @return Sortierte Zahlen
|
||||||
|
* @throws RobotException wenn der Roboter in einem ungültigen Zustand ist,
|
||||||
|
* oder das Array nicht seinen Vorstellungen entspricht.
|
||||||
|
*/
|
||||||
|
public int[] think(int[] zahlen) throws RobotException;
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
package tpe.exceptions.roboter.exceptions;
|
||||||
|
|
||||||
|
public class RobotException extends Exception{
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
package tpe.exceptions.roboter.exceptions;
|
||||||
|
|
||||||
|
public class RobotIllegalStateException {
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
package tpe.exceptions.roboter.exceptions;
|
||||||
|
|
||||||
|
public class RobotMagicValueException {
|
||||||
|
}
|
Loading…
Reference in New Issue