Question: *** Method to return the type of triangle represented by three sides. * This only checks for whether a triangle is equilateral, isosceles, or scalene
Run the following code and take notes on the coding standards and practices it violates and explain. *** Method to return the type of triangle represented by three sides. * This only checks for whether a triangle is equilateral, isosceles, or scalene * @return a string with a description of the type of triangle @param side_a the first side @param side_b the second side, etc. public String Triangle Type(int side_a, int b, int c) { if (side_a == b) return TRIANGLE_ISOSCELES; if (side_a == 0) { return TRIANGLE_ISOSCELES; } if (side_a == b && b == c) { return EQUILATERAL_TRIANGLE; } return SCALENE_triangle;}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
