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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
