package vehicle_rental;

public class Car extends Vehicle {
	private Engine engine;

	public Car(int id, String brand, boolean rendted, Engine engine) {
		super(id, brand, rendted);
		this.engine = engine;
	}

	@Override
	public String toString() {
		return "Car [engine=" + engine + "]";
	}

	public void drive() {
		System.out.println("Car is driving on the road.");
	}

	public void printCategory() {
		System.out.println("This is a Car.");
	}

	public Engine getEngine() {
		return engine;
	}

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