Area of Triangle Using Mehtod

 import java.util.*;


import javax.sql.rowset.spi.SyncResolver;

public class AreaOfTriangle {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter first side of the Triangle : ");
int s1 = sc.nextInt();
System.out.println("Enter Second side of the Triangle :");
int s2 = sc.nextInt();
System.out.println("Enter Third side of the Triangle :");
int s3 = sc.nextInt();

if (validationOfTriangle(s1, s2, s3) == true) {
System.out.println("Area of triangle is ; " + calculateArea(s1, s2, s3));
} else{
System.out.println("With the given sides, Triangle can not be formed");
}

}

public static boolean validationOfTriangle(int s1, int s2, int s3) {
if (s1 + s2 > s3 && s2 + s3 > s1 && s3 + s1 > s2) {
return true;
} else {
return false;
}
}

public static double calculateArea(int s1, int s2, int s3) {
double s = (s1 + s2 + s3) / 2;
double area = 0;
area = Math.sqrt(s * ((s - s1) * (s - s2) * (s - s3)));
return area;
}
}

Google Script for Data Entry Form in Google Spreadsheet

// function to validate the entry made by user in user form function validateEntry (){ // declare a variable and referernece of active goog...