package ch06_08;
import ch06_07.TuXing;
public class JuXing extends TuXing {
	private double changDu;
	private double kuanDu;
	public JuXing(double changDu, double kuanDu) {// 构造方法
		super("矩形");
		this.changDu = changDu;
		this.kuanDu = kuanDu;
	}
	public double getChangDu() {
		return changDu;
	}
	public void setChangDu(double changDu) {
		this.changDu = changDu;
	}
	public double getKuanDu() {
		return kuanDu;
	}
	public void setKuanDu(double kuanDu) {
		this.kuanDu = kuanDu;
	}
	//对mj()方法重写
	@Override
	public double mj() {
		return changDu * kuanDu;
	}
	//对zc()方法重写
	@Override
	public double zc() {
		return (changDu + kuanDu) * 2;
	}
}
