public static SorterParams.SortType ChooseSortTypeMenu() throws IOException
    {
        int menuSelect;
        SorterParams.SortType sType = SorterParams.SortType.SELECTION;  //default value
        
        do
        {
            clearScreen();
            System.out.println("(1) Selection sort");
            System.out.println("(2) Insertion sort");
            System.out.println("(3) Shell sort");
            System.out.println("(4) Merge sort");
            System.out.println("(5) Merge Hybrid sort");
            System.out.println("(6) Quick sort");
            System.out.println("(7) Quick Hybrid sort");
            System.out.println("(8) Exit");
            menuSelect = getMenuItem("Enter the sort type: ", 8);
        }while(menuSelect < 0);
        
        switch(menuSelect)
        {
            case 1:
                sType = SorterParams.SortType.SELECTION;
                break;
            case 2:
                sType = SorterParams.SortType.INSERTION;
                break;
            case 3:
                sType = SorterParams.SortType.SHELL;
                break;
            case 4:
                sType = SorterParams.SortType.MERGE;
                break;
            case 5:
                sType = SorterParams.SortType.MERGEHYBRID;
                break;
            case 6:
                sType = SorterParams.SortType.QUICK;
                break;
            case 7:
                sType = SorterParams.SortType.QUICKHYBRID;
                break;
            case 8:
                exitProgram();
                break;
        }
        return sType;
    }