创建汽车接口
public interface Car {
void start();
void run();
void stop();
}
创建司机类
public class Driver {
/**
* 成员内部类Benz
*/
class Benz implements Car {
private String model;
private double price;
private String color;
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public String getColor() {
return color;
}
public void setColor(String co