package subtype;

public class Bird {
	double flightEfficiency;
	String billType;

	public Bird(double flightEfficiency,String billType) {
		this.flightEfficiency=flightEfficiency;
		this.billType = billType;
	}

	public void fly() {
		if (flightEfficiency > 0) System.out.println("" + this + " -- Look, I'm flying!");
	}

	public Bird son(Bird a) {
		return new Bird(a.flightEfficiency,a.billType);
	}

	static public void main(String[] args) {
		Bird robin = new Bird(0.79,"pointy");
		System.out.println("Made a bird: " + robin);
		robin.fly();
	}

}