Write a program and define the function "area" to find area of rectangle square and triangle.
16/03/2013 13:22
Here is it
public class recsqutri
{
void area(int l,int b)
{
int area=l*b;
System.out.println(area);
}
void area()
{
int side=5;
int area=side*side;
System.out.println(area);
}
void area(double a,double b,double c)
{
double area=a*b*c;
System.out.println(area);
}
public static void main(String args[])
{
recsqutri obj=new recsqutri();
obj.area(5,6);
recsqutri obj1=new recsqutri();
obj1.area();
recsqutri obj2=new recsqutri();
obj2.area(0.5,2,1);
}
}