Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var shapes = new Shape[]
            {
                new Square(5),
                new Circle(5)
            };

            var area = new AreaCalculator(shapes);
            //Console.WriteLine(area.Show());

            var areaOutput = new AreaCalculatorOutput(area);

            Console.WriteLine(areaOutput.ShowHtml());
            Console.WriteLine(areaOutput.ShowJson());
            Console.WriteLine(areaOutput.ShowXml());

            Console.ReadKey();
        }
Ejemplo n.º 2
0
 public AreaCalculatorOutput(AreaCalculator areaCalculator)
 {
     this.areaCalculator = areaCalculator;
 }