码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2017-09-09 12:59:24      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:计算   mat   math   turn   ble   编写   面积   etl   程序   

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;
}
}

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

标签:计算   mat   math   turn   ble   编写   面积   etl   程序   

原文地址:http://www.cnblogs.com/Archon-Cty/p/7497854.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!