import javabook.*;

/*
 * Introduction to OOP with Java 2nd Edition, McGraw-Hill
 *	
 *  A sample program to test the heapsort algorithm.
 *  
 * @author Dr. Caffeine
 *
 */
class TestHeap
{
    
    
    public static void main (String[] args)
    {
        int[ ] number = {90, 84, 44, 77, 12, 5, 38, 17, 23 } ;
        
                        //{90, 38, 44, 84, 5, 23, 17, 77, 12 } ;
        
        int[ ] sortedList;
        
        Heap heap = new Heap( );
        
        heap.setData( number );
        
        sortedList = heap.sort( );
        
        for (int i = 0; i < sortedList.length; i++ ) { //print out
            System.out.print("   " + sortedList[i]);                                                  //the sorted
        }
        
        System.out.println("");
        
    }
 
}