Pr_robot_factory/Main.java

28 lines
640 B
Java

import domain.C3PO;
import domain.R2D2;
public class Main {
public static void main(String[] args) {
int[] input = {6,5,4,3,2,1};
C3PO c = new C3PO(1000, "cc");
System.out.println(c.sorting(input));
R2D2 r = new R2D2(1000, "cc");
System.out.println(r.sorting(input));
//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);
}
*/
}
}