class CompositeMain {
    public static void main(String[] args) {
        System.out.println("Wzorzec Kompozyt, części pojazdów...");
        var fastVehicle = new SportVehicle("sportowy");
        var engine = new VehiclePart("szybki-silnik");
        engine.addPart(new VehiclePart("głowica"));
        var breaks = new VehiclePart("super-hamulce");
        var transmission = new VehiclePart("automatycza-skrzynia-biegów");
        fastVehicle.addPart(engine);
        fastVehicle.addPart(breaks);
        fastVehicle.addPart(transmission);
        fastVehicle.printParts();
    }
}
