class TriangleList2 {

   public boolean deleteTriangle(double s1In, double s2In, double s3In) {
   
      boolean result = false;
      int index = -1;
      Triangle t = new Triangle(s1In, s2In, s3In);
      for (int i = 0; i < numberOfTriangles; i++) {
         if (tList[i].equals(t)) { // using equals method in place of if below
         // if (tList[i].getS1() == s1In 
         //    && tList[i].getS2() == s2In
         //    && tList[i].getS3() == s3In) {
         //    
            for (int j = i; j < numberOfTriangles - 1; j++) {
               tList[j] = tList[j + 1];
            }
            tList[numberOfTriangles - 1] = null; // overwrite duplicate at end
            numberOfTriangles--;
            result = true;
            break;
         }
      }
   
      return result;
   }

   public  TriangleList2(String listNameIn, Triangle[] tListIn, 
                        int numberOfTrianglesIn);

}