public void StyleCopRectangleTask() { logger.Info("StyleCop. Task : Rectangles"); writer.Write("\n\t\tStyleCop. Task : Rectangles"); try { Rectangle rectangleOne = new Rectangle(new Point(2, 1), 7, 3); Rectangle rectangleTwo = new Rectangle(new Point(5, 3), 6, 4); writer.Write("\nThe data of first rectangle:"); writer.Write(rectangleOne.ToString()); writer.Write("\nMove rectangle along x-axis: 1. Move rectangle along y-axis: 7."); writer.Write("The data of modified first rectangle:"); writer.Write(rectangleOne.MoveAlongAxis(1, 7).ToString()); writer.Write("\nThe data of second rectangle:"); writer.Write(rectangleTwo.ToString()); writer.Write("\nRectangle resize. Width:3, Height:7. "); writer.Write("The data of modified second rectangle:"); writer.Write(rectangleTwo.Resize(3, 7).ToString()); Rectangles rectangles = new Rectangles(rectangleOne, rectangleTwo); writer.Write("\nFind Intersection of rectangles: "); if (rectangles.DoShapesOverlap()) { writer.Write(rectangles.FindIntersectionOfShapes().ToString()); writer.Write("\nFind the smallest rectangle: "); writer.Write(rectangles.FindTheSmallestRectangle().ToString()); } } catch (ArgumentException ex) { logger.Error(ex.Message); } }