package abstractFactory.rusFleet;
import abstractFactory.Bus;
import abstractFactory.Car;
public class Liaz
extends Bus
implements Cloneable { private boolean ASKP;
public Liaz
(String number,
int passengerNum,
boolean askp
) { super(number, 3, 4, passengerNum + 1, 160, passengerNum, false);
ASKP = askp;
}
public boolean isASKP() {
return ASKP;
}
//equals/hashCode/toString >>
public boolean equals
(Object o
) { if (!(o instanceof Car)) {
return false;
}
if (!(o instanceof Liaz)) {
return o.equals(this);
}
Liaz other = (Liaz) o;
return (super.equals(o) &&
other.ASKP == ASKP);
}
public int hashCode() {
int res = super.hashCode();
res = res * 37 + (ASKP ? 1 : 0);
return res;
}
String res =
super.
toString();
res += ", ASKP=" + ASKP;
return super.toString();
}
}