package com.sf.day09.interfacepackage.impl;

import com.sf.day09.interfacepackage.Car;
import com.sf.day09.interfacepackage.Car2;

public class Car2Impl implements Car2 {
    @Override
    public void run() {
        System.out.println("car2  run");
    }

    @Override
    public void eat(Double money) {
        System.out.println("car2  eat");
    }

    @Override
    public void back() {
        System.out.println(" car2   BACK");
    }


    public static void main(String[] args) {
        Car2 car2 = new Car2Impl();
        car2.back();
        car2.eat(100.11);
        car2.run();

        Car car = new Car2Impl();
        car.start();
        car.eat(1001.1);
        car.run();

        Car2 car22 = (Car2) car;
        car22.back();
    }
}
