
Patrick B. answered 08/04/21
Math and computer tutor/teacher
class CalcArea
{
protected static double Area(double width, double length)
{
return(width*length);
}
protected static double Area( double radius)
{
return(3.1415*radius*radius);
}
}
class CalcAreaMain
{
public static void main(String args[])
{
System.out.println(" The area of the rectange is " + CalcArea.Area(3.0,4.0));
System.out.println(" The area of the circle is " +CalcArea.Area(3.0));
}
}