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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started