public class ArrayTool{
  
  public static int sum(int[] data){
    int sum = 0;
    for (int i = 0; i < data.length; i++){
      sum = sum + data[i];  
    }
    return sum;
  }
  
  public static boolean allPositive(int[] data){
    /* Returns true if all integers in the data array are positive, 
     * false otherwise.
     */
    return true; //change this accordingly 
  }
  
  public static int max(int[] data){
      //Returns the max element of input array data
      return 0; //change this accordingly 
  }
  
    
  public static void main(String [] args){
    int[] data = new int[] {6, 10, 12, 0, 0}; //Array of integers
    int s = sum(data);
    System.out.println(s);
    
    /*Uncomment the statements below to test allPositive & max method */
    //System.out.println(allPositive(data));
    //System.out.println(max(data));
  }
}
