![]() |
#2
落叶深蓝色2011-09-04 20:41
|

class Rectangle {
int Length;
int Width;
int Area;
int circumference;
public void Rrectangle(int length, int width) {
this.Length = length;
this.Width = width;
}
public int getLength() {
return Length;
}
public int setLength(int length) {
return this.Length = length;
}
public int getWidth() {
return Width;
}
public void setWidth(int width) {
this.Width = width;
}
public int getArea(int length,int width){
return length*width;
}
public int getCircumference(int length,int width){
return 2*(length+width);
}
}
int Length;
int Width;
int Area;
int circumference;
public void Rrectangle(int length, int width) {
this.Length = length;
this.Width = width;
}
public int getLength() {
return Length;
}
public int setLength(int length) {
return this.Length = length;
}
public int getWidth() {
return Width;
}
public void setWidth(int width) {
this.Width = width;
}
public int getArea(int length,int width){
return length*width;
}
public int getCircumference(int length,int width){
return 2*(length+width);
}
}