RoboterFabrik/Roboter/tpe/exceptions/roboter/Nexus6.java

48 lines
1.1 KiB
Java
Raw Normal View History

2022-12-27 11:09:41 +01:00
package tpe.exceptions.roboter;
2023-01-07 14:15:53 +01:00
import tpe.exceptions.RobotException;
2023-01-08 09:54:17 +01:00
import tpe.exceptions.RobotIllegalStateException;
2023-01-08 09:54:17 +01:00
public class Nexus6 extends Robots {
2023-01-07 18:48:00 +01:00
private RobotType robotType;
private static int id=19281982;
private static String name="Pris";
private static boolean powerSwitch=false;
private static Nexus6 instance = new Nexus6(id, name, powerSwitch);
2023-01-07 18:48:00 +01:00
private Nexus6(int id, String name, boolean powerSwitch) {
2023-01-08 09:54:17 +01:00
super(name);
2023-01-07 18:48:00 +01:00
robotType= RobotType.NEXUS6;
}
public static Nexus6 getInstance() {
return instance;
}
@Override
2023-01-08 09:54:17 +01:00
public String speak(int[] zahlen) throws RobotException {
throw new RobotIllegalStateException("Der Roboter ist ausgeschaltet!", this.getName());
}
@Override
2023-01-08 09:54:17 +01:00
public int[] think(int[] zahlen) throws RobotException {
throw new RobotIllegalStateException("Der Roboter ist ausgeschaltet!", this.getName());
}
public int getId() {
return id;
}
@Override
public RobotException getLastException() {
// TODO Auto-generated method stub
return null;
}
2023-01-08 09:54:17 +01:00
public RobotType getRobotType () {
return this.robotType;
}
2022-12-27 11:09:41 +01:00
}