package com.example.dependencyinjection;

public class Car {
    // STEP 1
    // private Engine engine = new Engine();

    // STEP 2
//    private final Engine engine;
//
//    public Car(Engine engine) {
//        this.engine = engine;
//    }

    private Engine engine;
    public void setEngine(Engine engine) {
        this.engine = engine;
    }


    public void start() {
        engine.start();
    }
}
