class Rectangle
{
private double len, wid;
public Rectangle()//求矩形周长
{
len = 0;
wid = 0;
}
public Rectangle(int l, int w)//求矩形面积
{
len = l;
wid = w;
}
public double perimeter()//求周长
{
return ((len + wid) * 2);
}
public double area()//求面积
{
return (len * wid);
}
public double Len//读写矩形的长度
{
get { return len; }
set { len = value; }
}
public double Wid//读写矩形的长度
{
get { return len; }
}
public void change(double l, double w)//改变矩形的周长和面积
{
len = l;
wid = w;
}
}