All pastes #803058 Raw Edit

Untitled

public text v1 · immutable
#803058 ·published 2007-11-30 21:21 UTC
rendered paste body
import java.util.Random;
import java.util.Scanner;
import java.io.InputStreamReader;

/**
 * @(#)LSortDriver.java
 *
 *
 * @author 
 * @version 1.00 2007/11/30
 */


public class LSortDriver 
{

    public static void main(String[] arg)
    {
    	Random num = new Random();
    	Scanner input=new Scanner(System.in);
    	//
    	//First Argument.  Length of List
    	System.out.printf("How many items do you want in the list?(1-50)");
    	int items = input.nextInt();
    	int list[] = new int[items];
    	//
    	//Bound checking for length of list.  Min 1, Max 50.
    	while(items<1 || items>50)
    	{
    		System.out.printf("Invalid input.(1-50)");
    		items = input.nextInt();
    	}
    	//
    	//Second Argument.  Print list after each sort?
    	System.out.printf("Do you want to print the sorted lists?(y)(n)");
       	//
       	//----------------------------------------------------------------------
       	//How do I read single character?
       	//----------------------------------------------------------------------
       	//
       	//
       	//Assign random integers between 0-100 into array.
       	for(int i=0; i<items; i++)
    	{
    		list[i] = num.nextInt(100); 
    	}
    }
    
    
}