2023-01-10 00:32:43 +01:00
|
|
|
import src.facade.FactorySystem;
|
|
|
|
import src.ui.UI;
|
2022-12-09 01:38:11 +01:00
|
|
|
|
2022-12-08 14:46:33 +01:00
|
|
|
public class Main {
|
|
|
|
public static void main(String[] args) {
|
2023-01-03 01:18:57 +01:00
|
|
|
FactorySystem fs = new FactorySystem("test_factory");
|
2022-12-09 10:45:51 +01:00
|
|
|
|
2023-01-03 01:18:57 +01:00
|
|
|
UI ui = new UI(fs);
|
2022-12-20 12:03:41 +01:00
|
|
|
|
2023-01-03 01:18:57 +01:00
|
|
|
// int[] input = {42,6,5,4,3,43,1};
|
|
|
|
// int[] input2 = input;
|
|
|
|
// C3PO Herbert = new C3PO(1, "Herbert");
|
|
|
|
// R2D2 Herb = new R2D2(0, "Herb");
|
|
|
|
// int[] input3 = {};
|
|
|
|
//
|
|
|
|
// //Herbert.triggerPowerSwitch();
|
|
|
|
//// Herb.triggerPowerSwitch();
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//// try{
|
|
|
|
//// String sorted = Herb.speak(input);
|
|
|
|
//// System.out.println(sorted);
|
|
|
|
//// } catch (RobotException re) {
|
|
|
|
//// System.out.println(re);
|
|
|
|
//// }
|
|
|
|
//
|
|
|
|
// try{
|
|
|
|
// int[] sorted = Herb.think(input);
|
|
|
|
// for(int i = 0; i < sorted.length; i++){
|
|
|
|
// System.out.print(" " + sorted[i]);
|
|
|
|
// }
|
|
|
|
// }catch(RobotException re){
|
|
|
|
// re.printStackTrace();
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// System.out.println("last exception thrown");
|
|
|
|
// String re = Herb.getLastException().toString();
|
|
|
|
// System.out.println(re);
|
|
|
|
//
|
2022-12-21 16:44:49 +01:00
|
|
|
// Herb.triggerPowerSwitch();
|
2023-01-03 01:18:57 +01:00
|
|
|
//
|
2022-12-21 16:44:49 +01:00
|
|
|
// try{
|
2023-01-03 01:18:57 +01:00
|
|
|
// int[] sorted = Herb.think(input);
|
|
|
|
// for(int i = 0; i < sorted.length; i++){
|
|
|
|
// System.out.print(" " + sorted[i]);
|
|
|
|
// }
|
|
|
|
// }catch(RobotException e){
|
|
|
|
// e.getLocalizedMessage();
|
|
|
|
// }
|
|
|
|
// System.out.println("last exception thrown");
|
|
|
|
// re = Herb.getLastException().toString();
|
|
|
|
// System.out.println(re);
|
|
|
|
//
|
|
|
|
// //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){
|
2022-12-21 16:44:49 +01:00
|
|
|
// System.out.println(re);
|
|
|
|
// }
|
2023-01-03 01:18:57 +01:00
|
|
|
//
|
|
|
|
// */
|
2022-12-08 14:46:33 +01:00
|
|
|
}
|
|
|
|
}
|