Example #1
0
        public void Run_BadShapePrinter_Example()
        {
            var badPrinter = new ShapePrinter();

            var rectangle = new Rectangle { Height = 10, Length = 20 };
            var circle = new Circle { Radius = 5 };

            badPrinter.PrintShapeArea(rectangle);
            badPrinter.PrintShapeArea(circle);
        }
Example #2
0
 private double GetRectangleArea(Rectangle rectangle)
 {
     return rectangle.Height * rectangle.Length;
 }