package domain; import robot.exceptions.RobotException; import robot.interfaces.Sorting; public class C3PO extends RobotBasics { public C3PO(int id, String name){ super(id, name); } @Override public int[] think(int[] zahlen) throws RobotException { return insertionSort.sorting(zahlen); } Sorting insertionSort = (int[] input) ->{ System.out.println("ich sortiere mit insertion-Sort"); return input; }; }