//4.WRITE A PROGRAM USING A FUNCTION OVERLOADING TECHNIQUE THAT COMPUTES AND DISPLAYS
//THE AREA OF A PARALLELOGRAM, A RHOMBUS AND A TRAPEZIUM.
import java.util.*;
public class Calculate
{
public static void main()
{
Scanner sc = new Scanner(System.in);
Calculate obj = new Calculate();
int a,b,e;
double a1,b1,f;
double a2,b2,c2,g;
System.out.println("Enter the length and breadth of the parallelogram");
a=sc.nextInt();
b=sc.nextInt();
System.out.println("Enter the diagonals of rhombus");
a1=sc.nextInt();
b1=sc.nextInt();
System.out.println("Enter the length of the two non parallel sides of the parallelogram and its height");
a2=sc.nextInt();
b2=sc.nextInt();
c2=sc.nextInt();
e=obj.area(a,b);
f=obj.area(a1,b1);
g=obj.area(a2,b2,c2);
System.out.println("The area of the Parallelogram="+e);
System.out.println("The area of the Rhombus="+f);
System.out.println("The area of the Trapezium="+g);
}
static int area(int a, int b)
{
return(a*b);
}
static double area(double a, double b)
{
return(1/2*(a*b));
}
static double area(double a, double b, double c)
{
return(1/2*(a+b)*c);
}
}