Updated everything. Further explanation in README

main
Philipp3107 2022-12-09 10:45:51 +01:00
parent 90d2d53530
commit 96313208b3
18 changed files with 37 additions and 19 deletions

View File

@ -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};

View File

@ -5,4 +5,6 @@ public class C3PO extends RobotBasics {
super(id, name);
}
}

View File

@ -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];
}
}

View File

@ -1,4 +1,4 @@
package roboter.exceptions;
package robot.exceptions;
public class RobotException extends Exception{
public RobotException(String errorMessage){

View File

@ -1,4 +1,4 @@
package roboter.exceptions;
package robot.exceptions;
public class RobotIllegalStateException extends RobotException{
public RobotIllegalStateException(String errormessage){

View File

@ -1,4 +1,4 @@
package roboter.exceptions;
package robot.exceptions;
public class RobotMagicValueException extends Exception{
public RobotMagicValueException(String errormessage){

View File

@ -1,8 +1,6 @@
/* (c) 2012 Thomas Smits */
//package tpe.exceptions.roboter;
package domain;
import roboter.RobotInstructions;
package robot.interfaces;
/**
* Interface für Roboter.

View File

@ -1,5 +1,5 @@
//package tpe.exceptions.roboter;
package domain;
package robot.interfaces;
//import tpe.exceptions.roboter.exceptions.RobotException;

View File

@ -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;

View File

@ -0,0 +1,6 @@
package robot.interfaces;
@FunctionalInterface
public interface Sorting {
String sorting (int[] input);
}