package xiaochengxu;
import java.util.Scanner;
public class mianjizhengfangxing extends mianji1 {
Scanner zhengfangxing=new Scanner(System.in);
System.out.print("请输入正方形的长:");
int chang=zhengfangxing.nextInt();
System.out.print("请输入正方形的宽:");
int kuan=zhengfangxing.nextInt();
@Override
public void mianji() {
// TODO Auto-generated method stub
int mianji=chang*kuan;
System.out.println("正方形的面积为"+mianji);
}
@Override
public void zhouchang() {
// TODO Auto-generated method stub
int zhouchang=(chang+kuan)*2;
System.out.println("正方形的面积为"+zhouchang);
}
}
摩诃迦叶
相关分类