Updated everything. Further explanation in README
parent
90d2d53530
commit
96313208b3
|
@ -1,8 +1,12 @@
|
|||
import domain.C3PO;
|
||||
import roboter.exceptions.RobotException;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
|
||||
C3PO Herbert = new C3PO(0, "Herbert");
|
||||
int[] input = {6,5,4,3,2,1};
|
||||
|
||||
|
||||
//just some testing
|
||||
/*C3PO Herbert = new C3PO(0, "Herbert");
|
||||
int[] input = {6,5,4,3,2,1};
|
||||
|
|
|
@ -5,4 +5,6 @@ public class C3PO extends RobotBasics {
|
|||
super(id, name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package domain;
|
||||
|
||||
import roboter.exceptions.RobotException;
|
||||
import roboter.exceptions.RobotIllegalStateException;
|
||||
import robot.exceptions.RobotException;
|
||||
import robot.exceptions.RobotIllegalStateException;
|
||||
import robot.interfaces.Robot;
|
||||
import robot.interfaces.RobotControl;
|
||||
import robot.interfaces.RobotInstructions;
|
||||
|
||||
|
||||
public class RobotBasics implements Robot {
|
||||
private int id;
|
||||
|
@ -14,7 +18,7 @@ public class RobotBasics implements Robot {
|
|||
this.power = false;
|
||||
}
|
||||
/**
|
||||
* @see domain.RobotControl
|
||||
* @see RobotControl
|
||||
*/
|
||||
@Override
|
||||
public int getId() {
|
||||
|
@ -22,7 +26,7 @@ public class RobotBasics implements Robot {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see domain.RobotControl
|
||||
* @see RobotControl
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
|
@ -30,7 +34,7 @@ public class RobotBasics implements Robot {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see domain.RobotControl
|
||||
* @see RobotControl
|
||||
*/
|
||||
@Override
|
||||
public void triggerPowerSwitch() {
|
||||
|
@ -42,7 +46,7 @@ public class RobotBasics implements Robot {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see domain.RobotControl
|
||||
* @see RobotControl
|
||||
*/
|
||||
@Override
|
||||
public boolean isPowerOn() {
|
||||
|
@ -50,7 +54,7 @@ public class RobotBasics implements Robot {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see roboter.RobotInstructions
|
||||
* @see RobotInstructions
|
||||
*/
|
||||
@Override
|
||||
public String speak(int[] zahlen) throws RobotException {
|
||||
|
@ -66,10 +70,14 @@ public class RobotBasics implements Robot {
|
|||
|
||||
}
|
||||
/**
|
||||
* @see roboter.RobotInstructions
|
||||
* @see RobotInstructions
|
||||
*/
|
||||
@Override
|
||||
public int[] think(int[] zahlen) throws RobotException {
|
||||
return new int[0];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
package roboter.exceptions;
|
||||
package robot.exceptions;
|
||||
|
||||
public class RobotException extends Exception{
|
||||
public RobotException(String errorMessage){
|
|
@ -1,4 +1,4 @@
|
|||
package roboter.exceptions;
|
||||
package robot.exceptions;
|
||||
|
||||
public class RobotIllegalStateException extends RobotException{
|
||||
public RobotIllegalStateException(String errormessage){
|
|
@ -1,4 +1,4 @@
|
|||
package roboter.exceptions;
|
||||
package robot.exceptions;
|
||||
|
||||
public class RobotMagicValueException extends Exception{
|
||||
public RobotMagicValueException(String errormessage){
|
|
@ -1,8 +1,6 @@
|
|||
/* (c) 2012 Thomas Smits */
|
||||
//package tpe.exceptions.roboter;
|
||||
package domain;
|
||||
|
||||
import roboter.RobotInstructions;
|
||||
package robot.interfaces;
|
||||
|
||||
/**
|
||||
* Interface für Roboter.
|
|
@ -1,5 +1,5 @@
|
|||
//package tpe.exceptions.roboter;
|
||||
package domain;
|
||||
package robot.interfaces;
|
||||
|
||||
//import tpe.exceptions.roboter.exceptions.RobotException;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package roboter;
|
||||
package robot.interfaces;
|
||||
|
||||
import roboter.exceptions.RobotException;
|
||||
import roboter.exceptions.RobotIllegalStateException;
|
||||
import robot.exceptions.RobotException;
|
||||
import robot.exceptions.RobotIllegalStateException;
|
||||
//import tpe.exceptions.roboter.exceptions.RobotMagicValueException;
|
||||
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
package robot.interfaces;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface Sorting {
|
||||
String sorting (int[] input);
|
||||
}
|
Loading…
Reference in New Issue