Solution :-Β
import java.util.*;
class p1{
double area(double a,double b,double c){
double s=(a+b+c)/2;
double d=s*((s-a)(s-b)(s-c));
double area1=(Math.sqrt(s*((s-a)(s-b)(s-c))));
return area1;
}
double area(int a,int b,int height){
double area2=0.5*height*(a+b);
return area2;
}
double area(double diagonal1,double diagonal2){
double area3=0.5*diagonal1*diagonal2;
return area3;
}
public static void main(){
overloading obj=new overloading();
double res1=obj.area(2.0,4.0,4.0);
double res2=obj.area(3,4,5);
double res3=obj.area(6.0,8.0);
System.out.println(βArea of scalene triangle=β+res1);
System.out.println(βArea of trapezium=β+res2);
System.out.println(βArea of rhombus =β+res3);
}
}