private static void rectangleTest()
 {
     Rectangle r = new Rectangle(2, 2) + new Rectangle(5, 1);
     d("Rectangle area: " + r.area());
     Square s = new Square(3);
     d("Square area: " + s.area());
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            Rectangle rec = new Rectangle();

            rec.setname("사각사각");
            rec.setXY(10, 20);
            rec.area();
            rec.show();
        }
        private static void rectangleTest()
        {
            Rectangle r = new Rectangle(2, 2) + new Rectangle(5, 1);

            d("Rectangle area: " + r.area());
            Square s = new Square(3);

            d("Square area: " + s.area());
        }