矩形类

来源:互联网 发布:长款流苏耳环淘宝价 编辑:程序博客网 时间:2024/06/05 14:25


public class Rectanlge {
 int length;
 int width;
 int circle;
 int area;
 public int getcircle(int a,int b){
  length=a;
  width=b;
  return circle=2*(length+width);
 }
 public int getarea(int a,int b){
  length=a;
  width=b;
  return area=length*width;
 }

}

0 0
原创粉丝点击