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