Write a class TriangleArea that contains the overloaded methods area, one that accepts the [5] length of the base of triangle and height of triangle as parameter. The other area method
accepts the length of three sides of a triangle.
The two formulas for computing the area are :
Area1 = 1 × × hh 2
Area2 = √( − )( − )( − )
Answers
Answered by
2
Answer:
class TriangleArea{
public double area(int length, into height){
//ToDo. implement formula
return length*height
}
public double area (int sidea,into sideb, int sidec){
implement formulae
}
}
Similar questions
Hindi,
3 months ago
English,
3 months ago
Business Studies,
3 months ago
Math,
7 months ago
Math,
10 months ago
Political Science,
10 months ago