public class Rectangle {
double length;
double width;
Rectangle(){
length=1;
width=1;
}
double perimrter(){
double p;
p=(length+width)*2;
return p;
}
double area(){
double a;
a=length*width;
return a;
}
public double getLength(){
return(length);
}
protected void setLength(double length){
this.length=length;
}
public double getWidth(){
return(width);
}
protected void setWidth(double width){
this.width=width;
}
public static void main(String[] args) {
System.out.println("计算结果如下:");
}
}