package com.sourcefellows.patterns.composite;

/**
 * Main
 */
public class Main {

    public static void main(String[] args) {

var auto = new CompoundComponent();
var motor =
        new SimpleComponent("Motor", Weight.createWeight(200, Weight.Unit.KILOGRAM));

var sitze = new CompoundComponent();
sitze.addComponent(new SimpleComponent("Vordersitz links",
        Weight.createWeight(28, Weight.Unit.KILOGRAM)));
sitze.addComponent(new SimpleComponent("Vordersitz rechts",
        Weight.createWeight(28, Weight.Unit.KILOGRAM)));
sitze.addComponent(new SimpleComponent("Rückbank",
        Weight.createWeight(62, Weight.Unit.KILOGRAM)));

auto.addComponent(motor);
auto.addComponent(sitze);

System.out.println(auto.getWeight());

    }
}