Ejemplo n.º 1
0
        public void Display()
        {
            Oct.Display();

            Console.WriteLine("What is the Length: {0}", length);
            string L = Console.ReadLine();

            length = Convert.ToInt32(L);
            Console.WriteLine("Whats the Width: {0}", width);
            string W = Console.ReadLine();

            width = Convert.ToInt32(W);
            Console.WriteLine("Area: {0}", GetArea());
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            //  Rectangle Rec = new Rectangle(0,0);

            // Rec.Display();

            Square Sqr = new Square(0, 0);


            Sqr.Display();

            Triangle Tri = new Triangle(0, 0);

            Tri.Display();

            Octogon Oct = new Octogon(0, 0);

            Oct.Display();


            Console.ReadLine();
        }