//车类
package Vehicle;
public abstract class Car {
private String carId; //车牌号
private String brand; //品牌
private int rent; //租金
public Car() {
super();
}
public Car(String carId, String brand, int rent) {
super();
this.carId = carId;
this.brand = brand;
this.rent = rent;
}
public String getCarId() {
return carId;
}
public void setCarId(String carId) {
this.carId = carId;
}
public String getBrand() {
return brand;
}
public void setBrand(String brand) {
this.brand = brand;
}
public int getRent() {
return rent;
}
public void setRent(int rent) {
this.rent = rent;
}
public abstract double carRent(double day);
}
package Vehicle;
//轿车类
public class Automobile extends Car{
private String type; //型号
public Automobile() {
super();
}
public Automobile(String carId, String brand, int rent, String type) {
super(carId, brand, rent);
this.type = type;
}
public Stri