class Circle {
  constructor(public readonly radius: number) {}
}

class Square {
  constructor(public readonly length: number) {}
}

class AreaCalculator {
  constructor(private readonly shapes: object[]) {}

  public sum(): number {
    // Logique pour additionner les aires ...
    return 0;
  }
}

class SumConsoleOutputter {
  constructor(private readonly calculator: AreaCalculator) {}

  public output(): void {
    const sum = this.calculator.sum();
    console.log(`Somme des aires : ${sum}`);
  }
}

const calculator = new AreaCalculator([new Circle(5), new Square(4)]);
const outputter = new SumConsoleOutputter(calculator);

outputter.output(); // affiche la somme des aires

export default {};
