Question: Create a class named Triangle.java implementing TriangleInterface. Include the following data members and methods: three double data members representing the three sides of a triangle
Create a class named Triangle.java implementing TriangleInterface. Include the following data members and methods:
three double data members representing the three sides of a triangle (private)
Constructor which takes three double numbers representing the three sides of the triangle
getter methods
public void setSides(double a, double b, double c) to set three sides of a triangle
Implements the methods specified in the interface
If the three numbers can not form a valid triangle, assign 0 to all sides.
Once completed, create a plain text file named result.txt, then summarize (copy) the result from running the Grader.class
public interface TriangleInterface extends Comparable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
