Categories
Uncategorized

CIA 1A

Example: Constructor and Method Overloading class consfun { double length,breadth,radius; consfun(double r);      {         radius=r;       } consfun(double l,double b)      {        length=l;        breadth=b;      } void area1()    {        double area;        area=3.14*radius*radius;        System.out.println(“Area of Square:”+area);     } void area1(double h)    {        double area;        area=0.5*(length+breadth)*h;        […]