public class KaChe extends QiChe{
private int load;
public void setLoad(int load){
if(load>0){
this.load=load;
}else{
System.out.println("请输出正确格式的载重量!");
}
}
public int getLoad(){
return load;
}
//重写父类的show()方法
public void show(){
public class MianBaoChe extends QiChe{
private int passenger;
public void setPassenger(int passenger){
if(passenger>0){
this.passenger=passenger;
}else{
System.out.println("请输出正确格式的载客量!");
}
}
public int getPassenger(){
return passenger;
}
//重写父类的show()方法
public void show(){