package org.academiadecodigo.enuminatti.carstand;

/**
 * MIT License
 * (c) 2017 Ricardo Constantino
 */

public abstract class CarDecorator implements Car {

    private Car car;
    private int price;
    private String specification;

    public CarDecorator(Car car, int price, String specification) {

        this.car = car;
        this.price = car.getPrice() + price;
        this.specification = car.getSpecifications() + " + " + specification;

    }

    @Override
    public int getPrice() {
        return this.price;
    }

    @Override
    public String getSpecifications() {
        return this.specification;
    }
}
