Create a Triangle class that has a main method plus two other methods. The main method will input the length of the triangles three sides from the user, determine if the lengths create a valid triangle and if so, prints the area.

To aid the main method, create two other methods as follows:

/**
* Method name: isValid
* Return type: boolean
* Parameters: double side1, double side2, double side3
* The method returns true if the sum of any two sides is greater than the other. Returns false otherwise
*/
public static boolean isValid(double side1, double side2, double side3)


/**
* Method name: area
* Return type: double
* Parameters: double side1, double side2, double side3
* The method returns the area of the triangle defined as
* s = (side1+side2+ side3)/2;
* area =Math.sqrt(s* (s-side1) * (s-side2) * (s-side3))
*/
public static double area(double side1, double side2, double side3)
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.