package com.sf.day09.interfacepackage;

import com.sf.day09.interfacepackage.impl.BigCar;
import com.sf.day09.interfacepackage.impl.CarImpl;

public class TestCar {
    public static void main(String[] args) {
        CarImpl car = new CarImpl();
        car.run();
        car.eat(400.00);
        //父类发引用指向子类的对象     多态
        Car car1 = new CarImpl();
        car1.eat(200.0);
        car1.run();

        Car car2 = new BigCar();
        car2.run();
        car2.eat(11.11);
        car2.start();
    }
}
