class Calcute {
   static double calArea(double a,double b,double c)
    {
        return (a*b+b*c+a*c)*2;
    }
    static double calVolume(double a,double b,double c)
    {
        return a*b*c;
    }
}

public class Main{
     public static void main(String [] args){
         System.out.println(Calcute.calArea(1,2,8));
         System.out.println(Calcute.calVolume(1,2,8));
     }
}

0
Posted in Java

Leave a Comment:

电子邮件地址不会被公开。