public class B
{
   public static void main(String args[])
{
   Rect A=new Rect();
   Rect C=new Rect(3,5);
   System.out.println(A.computerArea()+' '+C.computerGirth());
   System.out.println(C.computerGirth()+' '+A.computerArea());
}
}
     
 
class Rect
{
   double sideA,sideB;
   double sideC,sideD;
   Rect()
{   this.sideA=3.0;
    this.sideB=3.0;
}
   Rect(double a,double b)
{
     sideC=a;
     sideD=b;
}
   double computerArea()

     return sideA*sideB;

    double computerGirth()
{
     return (sideC+sideD)/2;
}
}

  

相关文章:

  • 2021-10-25
  • 2022-12-23
  • 2021-05-06
  • 2022-12-23
  • 2021-12-16
  • 2021-12-11
  • 2021-11-23
  • 2021-07-03
猜你喜欢
  • 2021-09-29
  • 2022-01-11
  • 2021-05-20
  • 2021-11-25
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
相关资源
相似解决方案