public static ArrayList ordering(){
        ArrayList list = new ArrayList();
        
        boolean running = true;   
        double  num;
        
                
        while(running){
            System.out.println("Type a number to add it to the list:" +
                    "\nType anything else to display the ordered list:");
            
            if(scan.hasNextDouble()){
                num = scan.nextDouble();
                scan.nextLine();
                addDouble(list, num);
            }
            else{
                running = false;
                scan.nextLine();
            }
        }
        
        Collections.sort(list);
        
        return list; 
    }