Question: 4) [20 marks] Create a class named MyTriangle that contains the following two methods: /**Returns true if the sum of any two sides is *greater
![4) [20 marks] Create a class named MyTriangle that contains the](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f66f7d422d8_42866f66f7cc5b14.jpg)
4) [20 marks] Create a class named MyTriangle that contains the following two methods: /**Returns true if the sum of any two sides is *greater than the third side * public static boolean isValid ( double side1, double side2, double side3) /**Returns the area of the triangle./ public static double area ( double sidel, double side2, double side3) The formula for computing the area is side1 + side2 + side3 area -s(s - side1) (s - side2) (s -side3) Write a test program that reads three sides for a triangle and computes the area if the input is valid. Otherwise, it displays that the input is invalid and it gives another chance for the user to enter valid input values
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
