diff --git a/Main.java b/Main.java index 60da185..bc56eb5 100644 --- a/Main.java +++ b/Main.java @@ -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}; diff --git a/domain/C3PO.java b/domain/C3PO.java index fc35f48..3bb12b0 100644 --- a/domain/C3PO.java +++ b/domain/C3PO.java @@ -5,4 +5,6 @@ public class C3PO extends RobotBasics { super(id, name); } + + } diff --git a/domain/RobotBasics.java b/domain/RobotBasics.java index 6677497..20d5cf0 100644 --- a/domain/RobotBasics.java +++ b/domain/RobotBasics.java @@ -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]; } + + + + } diff --git a/out/production/Robot_Factory_PR/Main.class b/out/production/Robot_Factory_PR/Main.class index 47f4d16..02d59ac 100644 Binary files a/out/production/Robot_Factory_PR/Main.class and b/out/production/Robot_Factory_PR/Main.class differ diff --git a/out/production/Robot_Factory_PR/domain/Robot.class b/out/production/Robot_Factory_PR/domain/Robot.class deleted file mode 100644 index dc6d4b3..0000000 Binary files a/out/production/Robot_Factory_PR/domain/Robot.class and /dev/null differ diff --git a/out/production/Robot_Factory_PR/domain/RobotBasics.class b/out/production/Robot_Factory_PR/domain/RobotBasics.class index ea9e091..d04f6ed 100644 Binary files a/out/production/Robot_Factory_PR/domain/RobotBasics.class and b/out/production/Robot_Factory_PR/domain/RobotBasics.class differ diff --git a/out/production/Robot_Factory_PR/domain/RobotControl.class b/out/production/Robot_Factory_PR/domain/RobotControl.class deleted file mode 100644 index 1859193..0000000 Binary files a/out/production/Robot_Factory_PR/domain/RobotControl.class and /dev/null differ diff --git a/out/production/Robot_Factory_PR/roboter/interfaces/Robot.class b/out/production/Robot_Factory_PR/roboter/interfaces/Robot.class new file mode 100644 index 0000000..914d322 Binary files /dev/null and b/out/production/Robot_Factory_PR/roboter/interfaces/Robot.class differ diff --git a/out/production/Robot_Factory_PR/roboter/interfaces/RobotControl.class b/out/production/Robot_Factory_PR/roboter/interfaces/RobotControl.class new file mode 100644 index 0000000..563286b Binary files /dev/null and b/out/production/Robot_Factory_PR/roboter/interfaces/RobotControl.class differ diff --git a/out/production/Robot_Factory_PR/roboter/RobotInstructions.class b/out/production/Robot_Factory_PR/roboter/interfaces/RobotInstructions.class similarity index 57% rename from out/production/Robot_Factory_PR/roboter/RobotInstructions.class rename to out/production/Robot_Factory_PR/roboter/interfaces/RobotInstructions.class index c7d67eb..c7cbc45 100644 Binary files a/out/production/Robot_Factory_PR/roboter/RobotInstructions.class and b/out/production/Robot_Factory_PR/roboter/interfaces/RobotInstructions.class differ diff --git a/out/production/Robot_Factory_PR/roboter/interfaces/Sorting.class b/out/production/Robot_Factory_PR/roboter/interfaces/Sorting.class new file mode 100644 index 0000000..d73ca12 Binary files /dev/null and b/out/production/Robot_Factory_PR/roboter/interfaces/Sorting.class differ diff --git a/roboter/exceptions/RobotException.java b/robot/exceptions/RobotException.java similarity index 82% rename from roboter/exceptions/RobotException.java rename to robot/exceptions/RobotException.java index c960076..ccbfcb2 100644 --- a/roboter/exceptions/RobotException.java +++ b/robot/exceptions/RobotException.java @@ -1,4 +1,4 @@ -package roboter.exceptions; +package robot.exceptions; public class RobotException extends Exception{ public RobotException(String errorMessage){ diff --git a/roboter/exceptions/RobotIllegalStateException.java b/robot/exceptions/RobotIllegalStateException.java similarity index 84% rename from roboter/exceptions/RobotIllegalStateException.java rename to robot/exceptions/RobotIllegalStateException.java index 96dd737..70b0e66 100644 --- a/roboter/exceptions/RobotIllegalStateException.java +++ b/robot/exceptions/RobotIllegalStateException.java @@ -1,4 +1,4 @@ -package roboter.exceptions; +package robot.exceptions; public class RobotIllegalStateException extends RobotException{ public RobotIllegalStateException(String errormessage){ diff --git a/roboter/exceptions/RobotMagicValueException.java b/robot/exceptions/RobotMagicValueException.java similarity index 84% rename from roboter/exceptions/RobotMagicValueException.java rename to robot/exceptions/RobotMagicValueException.java index 81ac8be..d0bf6a5 100644 --- a/roboter/exceptions/RobotMagicValueException.java +++ b/robot/exceptions/RobotMagicValueException.java @@ -1,4 +1,4 @@ -package roboter.exceptions; +package robot.exceptions; public class RobotMagicValueException extends Exception{ public RobotMagicValueException(String errormessage){ diff --git a/domain/Robot.java b/robot/interfaces/Robot.java similarity index 80% rename from domain/Robot.java rename to robot/interfaces/Robot.java index 4cbec0f..105b9a9 100644 --- a/domain/Robot.java +++ b/robot/interfaces/Robot.java @@ -1,8 +1,6 @@ /* (c) 2012 Thomas Smits */ //package tpe.exceptions.roboter; -package domain; - -import roboter.RobotInstructions; +package robot.interfaces; /** * Interface für Roboter. diff --git a/domain/RobotControl.java b/robot/interfaces/RobotControl.java similarity index 99% rename from domain/RobotControl.java rename to robot/interfaces/RobotControl.java index fc4b51c..0957a70 100644 --- a/domain/RobotControl.java +++ b/robot/interfaces/RobotControl.java @@ -1,5 +1,5 @@ //package tpe.exceptions.roboter; -package domain; +package robot.interfaces; //import tpe.exceptions.roboter.exceptions.RobotException; diff --git a/roboter/RobotInstructions.java b/robot/interfaces/RobotInstructions.java similarity index 94% rename from roboter/RobotInstructions.java rename to robot/interfaces/RobotInstructions.java index 36e7673..3fb364a 100644 --- a/roboter/RobotInstructions.java +++ b/robot/interfaces/RobotInstructions.java @@ -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; diff --git a/robot/interfaces/Sorting.java b/robot/interfaces/Sorting.java new file mode 100644 index 0000000..df891b4 --- /dev/null +++ b/robot/interfaces/Sorting.java @@ -0,0 +1,6 @@ +package robot.interfaces; + +@FunctionalInterface +public interface Sorting { + String sorting (int[] input); +}