Pr_robot_factory/Main.java

39 lines
905 B
Java

import domain.*;
import robot.exceptions.RobotException;
public class Main {
public static void main(String[] args) {
int[] input = {42,6,5,4,3,2,1};
int[] input2 = input;
C3PO Herbert = new C3PO(1, "Herbert");
R2D2 Herb = new R2D2(0, "Herb");
//Herbert.triggerPowerSwitch();
Herb.triggerPowerSwitch();
try{
String array = Herb.speak(input);
System.out.println(array);
} catch (RobotException e) {
System.out.println(e);
}
//System.out.println("Was neues ausgeben");
//just some testing
/*C3PO Herbert = new C3PO(0, "Herbert");
int[] input = {6,5,4,3,2,1};
Herbert.triggerPowerSwitch();
try{
String asString = Herbert.speak(input);
System.out.println(asString);
}catch(RobotException re){
System.out.println(re);
}
*/
}
}