static void Main(string[] args) { Point point1 = new Point(1, 2); Point point2 = new Point(2, 3); Point point3 = new Point(12, 5); ShapeDescriptor shape = new ShapeDescriptor(point1, point2, point3); shape.ShapeType(); Console.ReadLine(); }
static void Main(string[] args) { var a = new Point(); var b = new Point(10, 10); var c = new Point(-10); var d = new Point(0, -10); var s1 = new ShapeDescriptor(a); var s2 = new ShapeDescriptor(a, b); var s3 = new ShapeDescriptor(a, b, c); var s4 = new ShapeDescriptor(a, c, d); var s5 = new ShapeDescriptor(a, b, c, d); Console.WriteLine("basic shapes are: s1=" + s1.basicShape + " s2=" + s2.basicShape + " s3=" + s3.basicShape + " s4=" + s4.basicShape + " s5=" + s5.basicShape); s1.ShapeType(s1); s2.ShapeType(s2); s3.ShapeType(s3); s4.ShapeType(s4); s5.ShapeType(s5); Console.WriteLine("shapes are: s1=" + s1.basicShape + " s2=" + s2.basicShape + " s3=" + s3.basicShape + " s4=" + s4.basicShape + " s5=" + s5.basicShape); }