package tpe.exceptions.roboter; import tpe.exceptions.RobotException; import tpe.exceptions.RobotIllegalStateException; public class Nexus6 extends Robots { 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); private Nexus6(int id, String name, boolean powerSwitch) { super(name); robotType= RobotType.NEXUS6; } public static Nexus6 getInstance() { return instance; } @Override public String speak(int[] zahlen) throws RobotException { throw new RobotIllegalStateException("Der Nexus6-Roboter ist ausgeschaltet!", this.getName()); } @Override public int[] think(int[] zahlen) throws RobotException { throw new RobotIllegalStateException("Der Nexus6-Roboter ist ausgeschaltet!", this.getName()); } public int getId() { return id; } public RobotType getRobotType () { return this.robotType; } @Override public void triggerPowerSwitch () { powerSwitch = false; } }