public Operation opperation() {

        Scanner scanner = new Scanner(System.in);

        out.println("Bitte wählen Sie Ihre Rechenoperation aus: ");
        out.println(" 0 = Hauptmenü ");
        out.println(" 1 = Addition ");
        out.println(" 2 = Subtraktion ");
        out.println(" 3 = Multiplikation ");
        out.println(" 4 = Division mittels Horner");
        out.println(" 5 = Substitution von x ");
        out.println(" 6 = 1. Ableitung ");
        out.println(" 7 = Polynom eingeben");
        out.println();

        Operation operation = null;

        boolean loop = true;
        while (loop) {
            try {
                int op = scanner.nextInt();
                out.println("Gewählt " + op);
                switch (op) {
                    case 0:
                        operation = Operation.LEAVE_SUBMENU;
                        loop = false;
                        break;
                    case 1:
                        operation = Operation.ADD;
                        loop = false;
                        break;
                    case 2:
                        operation = Operation.SUBSTRACT;
                        loop = false;
                        break;
                    case 3:
                        operation = Operation.MULITPLY;
                        loop = false;
                        break;
                    case 4:
                        operation = Operation.DIVIDE;
                        loop = false;
                        break;
                    case 5:
                        operation = Operation.EVALUATE;
                        loop = false;
                        break;
                    case 6:
                        operation = Operation.DERIVE;
                        loop = false;
                        break;
                    default:
                        out.println("Keine korrekte Eingabe. Bitte wiederholen.");
                }
            } catch (InputMismatchException e) {
                out.println("Falsche Eingabe. Bitte geben Sie eine Ganzzahl ein, die den Möglichkeiten der Aufzählung entspricht.");
                scanner = new Scanner(System.in);
            }
        }
        return operation;

    }