/**
*  Program declares and instantiates two 100 elements arrays; generates random numbers to fill one
*  of them; This version correctly fills the second array. To illustrate that it works, each element
*  is assigned a value one greater than that of its corresponding element in the first array.
*  It does the necessary item by item assignment.  It is done inside the loop but could be done
*  as a separate loop.
*
*/

import java.util.Random;
public class DriverSortV6
{
   
	
	public static void main(String[]args)
	{  

		Sorter sort1,sort2;
		Random rd;
		
	   int [] randomNumbers;  
		int [] temp;
		
		// instantiation of new arrays which makes all their contents 0
		temp = new int [100];
		randomNumbers = new int [100];
		
		sort1 = new Sorter();
		rd = new Random();
		
		    // print arrays to show initial contents
		System.out.println ("temp  time 1");
		for (int i = 0; i < 100; i++)
		  System.out.print ("^" + temp[i] + "^");
		System.out.println();
	    
		System.out.println ("randomNumbers");
		for (int i = 0; i < 100; i++)
		  System.out.print ("^" + randomNumbers[i] + "^");
 		System.out.println();
		 

	  for(int i = 0; i < 100; i++)
	  {
	  	 randomNumbers[i] = (int)( (Math.random()*350)+1);  
		 temp[i] = randomNumbers[i] + 1;

	  }
  	  
	       // pirnt arrays after randomNumbers has been given values
	   System.out.println ("temp time 2");
		for (int i = 0; i < 100; i++)
		  System.out.print ("^" + temp[i] + "^");
		System.out.println();
	    
		System.out.println ("randomNumbers");
		for (int i = 0; i < 100; i++)
		  System.out.print ("^" + randomNumbers[i] + "^");
 		System.out.println();
 
	  } // end main
}  // end class

