编写程序,试用公式计算圆面积和周长陈天艺1636050045

public class Circle{
private double r;
public Circle(double r){
this.r =r;
}
public double getLength(){
return 2*Math.PI*r;
}
public double getArea(){
return Math.PI*r*r;
}
}

 


posted @ 2017-09-09 11:54  Archon  阅读(374)  评论(0编辑  收藏  举报