Todos erweitert. UI erweitert zum anzeigen und anlegen von Roboter.
parent
3dac4fed82
commit
aba5233694
24
README.md
24
README.md
|
@ -26,8 +26,8 @@
|
||||||
* [Factrory](#-classe-factory-)
|
* [Factrory](#-classe-factory-)
|
||||||
* ### [Infrastructure](#infratructure-1)
|
* ### [Infrastructure](#infratructure-1)
|
||||||
* [Persistenz](#-classe-persistenz-)
|
* [Persistenz](#-classe-persistenz-)
|
||||||
* ### [safety](#robot-1)
|
* ### [utility](#robot-1)
|
||||||
* ### [safety](#exceptions-1)
|
* ### [utility](#exceptions-1)
|
||||||
* [RobotException](#-class-robotexception-)
|
* [RobotException](#-class-robotexception-)
|
||||||
* [RobotIllegalStateException](#-class-robotillegalstateexception-)
|
* [RobotIllegalStateException](#-class-robotillegalstateexception-)
|
||||||
* [RobotMagicValueException](#-class-robotmagicvalueexception-)
|
* [RobotMagicValueException](#-class-robotmagicvalueexception-)
|
||||||
|
@ -45,15 +45,21 @@
|
||||||
|
|
||||||
# TO-Dos:
|
# TO-Dos:
|
||||||
|
|
||||||
* Sortier Algorythem C3PO, R2D2 (mit Ausgabe)
|
* Sortier Algorythem C3PO, R2D2 (mit Ausgabe) --[done]--
|
||||||
|
|
||||||
* Bei Erstellung eines Roboters wird einne SerienNr erstellt
|
* Bei Erstellung eines Roboters wird einne SerienNr erstellt --[done]--
|
||||||
|
|
||||||
* Wichtige getter for Robots (getName)
|
* Wichtige getter for Robots (getName) --[done]--
|
||||||
|
|
||||||
* Exception Classes (Throwable einfügen)
|
* Exception Classes (Throwable einfügen) --[done]--
|
||||||
|
|
||||||
* RobotFactory, die mit enum(RobotType) Objekt von R2 und C3PO erstellen kann
|
* RobotFactory, die mit enum(RobotType) Objekt von R2D2 und C3PO erstellen kann --[abgewandelt für Exceptions]--
|
||||||
|
|
||||||
|
* Persistenz einrichten
|
||||||
|
|
||||||
|
* funktionalitäten der UI zusammenfassen
|
||||||
|
|
||||||
|
* funtkionalitäten der UI implementieren
|
||||||
|
|
||||||
* Nexus6(Singleton) implementieren, kann nichts (Illegal-State)
|
* Nexus6(Singleton) implementieren, kann nichts (Illegal-State)
|
||||||
|
|
||||||
|
@ -199,9 +205,9 @@ ___
|
||||||
|
|
||||||
`loadFactoryData():Object -> throws`
|
`loadFactoryData():Object -> throws`
|
||||||
|
|
||||||
## safety
|
## utility
|
||||||
|
|
||||||
### safety
|
### utility
|
||||||
|
|
||||||
<h2 align="center">
|
<h2 align="center">
|
||||||
Class RobotException
|
Class RobotException
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package domain;
|
package domain;
|
||||||
|
|
||||||
import safety.robot_exceptions.ExceptionStorage;
|
import utility.robot_exceptions.ExceptionStorage;
|
||||||
import safety.robot_exceptions.RobotException;
|
import utility.robot_exceptions.RobotException;
|
||||||
import safety.robot_exceptions.robotExceptions;
|
import utility.robot_exceptions.robotExceptions;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
public abstract class Robot implements safety.interfaces.Robot, Serializable {
|
public abstract class Robot implements utility.interfaces.Robot, Serializable {
|
||||||
protected ExceptionStorage exceptions;
|
protected ExceptionStorage exceptions;
|
||||||
private int id;
|
private int id;
|
||||||
private String name;
|
private String name;
|
||||||
|
@ -26,7 +26,7 @@ public abstract class Robot implements safety.interfaces.Robot, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see safety.interfaces.RobotControl;
|
* @see utility.interfaces.RobotControl;
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int getId() {
|
public int getId() {
|
||||||
|
@ -34,7 +34,7 @@ public abstract class Robot implements safety.interfaces.Robot, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see safety.interfaces.RobotControl;
|
* @see utility.interfaces.RobotControl;
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
@ -42,7 +42,7 @@ public abstract class Robot implements safety.interfaces.Robot, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see safety.interfaces.RobotControl;
|
* @see utility.interfaces.RobotControl;
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void triggerPowerSwitch() {
|
public void triggerPowerSwitch() {
|
||||||
|
@ -54,7 +54,7 @@ public abstract class Robot implements safety.interfaces.Robot, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see safety.interfaces.RobotControl;
|
* @see utility.interfaces.RobotControl;
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isPowerOn() {
|
public boolean isPowerOn() {
|
||||||
|
@ -62,7 +62,7 @@ public abstract class Robot implements safety.interfaces.Robot, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see safety.interfaces.RobotControl;
|
* @see utility.interfaces.RobotControl;
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RobotException getLastException() {
|
public RobotException getLastException() {
|
||||||
|
@ -157,10 +157,6 @@ public abstract class Robot implements safety.interfaces.Robot, Serializable {
|
||||||
int temp = input[i];
|
int temp = input[i];
|
||||||
input[i] = input[small];
|
input[i] = input[small];
|
||||||
input[small] = temp;
|
input[small] = temp;
|
||||||
/*for(int n = 0; n < input.length; n++){
|
|
||||||
System.out.print( " " + input[n]);
|
|
||||||
}
|
|
||||||
System.out.println();*/
|
|
||||||
}
|
}
|
||||||
return input;
|
return input;
|
||||||
}else{
|
}else{
|
||||||
|
|
Loading…
Reference in New Issue