Class IntArrayWorker

java.lang.Object
  extended by IntArrayWorker

public class IntArrayWorker
extends Object


Constructor Summary
IntArrayWorker()
           
 
Method Summary
 void fillCount()
          Method to fill with an increasing count
 void fillPattern1()
          fill the array with a pattern
 int getTotal()
          Method to return the total
 int getTotalNested()
          Method to return the total using a nested for-each loop
 void print()
          print the values in the array in rows and columns
 void setMatrix(int[][] theMatrix)
          set the matrix to the passed one
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntArrayWorker

public IntArrayWorker()
Method Detail

fillCount

public void fillCount()
Method to fill with an increasing count


fillPattern1

public void fillPattern1()
fill the array with a pattern


getTotal

public int getTotal()
Method to return the total

Returns:
the total of the values in the array

getTotalNested

public int getTotalNested()
Method to return the total using a nested for-each loop

Returns:
the total of the values in the array

print

public void print()
print the values in the array in rows and columns


setMatrix

public void setMatrix(int[][] theMatrix)
set the matrix to the passed one

Parameters:
theMatrix - the one to use