package tom;
public class mianJi {
int length=0,width=0,mianJi=0;
public void setLength(int n){
length=n;
}
public int getLength(){
return length;
}
public void setWidth(int n){
width=n;
}
public int getWidth(){
return width;
}
public void setMianJi(int a,int b){
length=a;
width=b;
mianJi=length*width;
}
public int getMianJi(){
return mianJi;
}
}
int length=0,width=0,
float mianJi=0;
getLength..
set.....
getWidth...
setWidth....
getMianJi(){
this.length*this.width;
}
..............