package dependency_injection;

public class Car implements I_Vehicle {
	
	I_Brand brand;
	
	public Car(I_Brand brand) {
		this.brand = brand;
	}
	
	public void run() {
		System.out.println("Car is running");
		String brnd = brand.brandName();
		System.out.println("Brand name: "+brnd);
	}

	public I_Brand getBrand() {
		return brand;
	}

	public void setBrand(I_Brand brand) {
		this.brand = brand;
	}
}
