写了个最后的输出类,找不到错误在那,求各位帮忙找找。
package cn.com.didizuchexitong;
//皮卡车类
public class PickUp extends Vehicle{
protected int carload; //载客量
protected int freight; //载货量
public int getCarload() {
return carload;
}
public void setCarload(int carload) {
this.carload = carload;
}
public int getFreight() {
return freight;
}
public void setFreight(int freight) {
this.freight = freight;
}
public PickUp(String name , int money , int carload , int freight) {
super();
// TODO Auto-generated constructor stub
this.name = name;
this.money = money;
this.carload = carload;
this.freight = freight;
}
public void dayIn(){
System.out.println("\t" + name +"\t\t" + money + "元/天" + "\t\t" + "载人:" + carload + "人"
+ "载货:" + freight + "吨");
}
}
JustWannaHugU
相关分类