All pastes #481855 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-05-11 00:57 UTC
rendered paste body
public class Problema6 {
	Matriz arreglo;
	Work w[];
	public Problema6()
	{

		int i;
		arreglo = new Matriz();
		arreglo.generaValores();
		w = new Work[10];
		for(i=0; i<=9; i++)
			w[i].SetParametros(i,arreglo);
		
		for(int j=0; j<10; j++)
			w[j].start();
	}
	
	public Matriz getArreglo()
	{
		return this.arreglo;
	}
	
	
	
	public static void main(String Args[])
	{
		Problema6 prob = new Problema6();
		//prob.w = 
		
		/*Imprimimos la matriz*/
		for (int j=0; j<10; j++)
		{
			for(int k = 0; k<9; k++)
			{
				System.out.print(prob.arreglo.getValor(j, k) + " ");
			}
		    System.out.print("\n");
		}
		
		/*Imprimimos los contadores de los workers*/
		for(int i=0 ; i<=9 ; i++)
		{
	         System.out.println(prob.w[i].getVeces());   
		}
	

	}
}