MotoVehicle
package com.mashibing.homework;
public abstract class MotoVehicle {
private int no;
private String brand;
public MotoVehicle(){
}
public MotoVehicle(int no,String brand){
this.no = no;
this.brand = brand;
}
public int getNo() {
return no;
}
public void setNo(int no) {
this.no = no;
}
public String getBrand() {
return brand;
}
public void setBrand(String brand) {
this.brand = brand;
}
public abstract int calcRent(int day);
}
Bus
package com.mashibing.homework;
public class Bus extends MotoVehicle {
private int seatcount;