Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Circle myCircle = new Circle();
            myCircle.Radius = 5;

            Rectangle myRectangle = new Rectangle();
            myRectangle.Height = 5;
            myRectangle.Width = 3;

            for (int i = 0; i < 10; i++)
            {
                Console.WriteLine("Rectangle is currently {0} x {1}.  The perimeter is {2}",
                                myRectangle.Width,
                                myRectangle.Height,
                                myRectangle.getPerimeter());

                Console.WriteLine("Circle radius is currently {0}.  The perimeter is {1}",
                    myCircle.Radius,
                    myCircle.getPerimeter());

                myCircle.scale(myCircle);
                myRectangle.scale(myRectangle);
            }
            Console.ReadLine();
        }