package com.example.dependencyinjection;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // STEP 1
        // Car car = new Car();

        // STEP 2
//         Car car = new Car(new GazEngine());

        // STEP 3
        Car car = new Car();
        car.setEngine(new ElectricEngine());
        car.start();
    }
}
