public static void Main()
    {
        ColorTriangle t1 =
            new ColorTriangle("синий", "прямоугольный",
                              8.0, 12.0);
        ColorTriangle t2 =
            new ColorTriangle("красный", "равнобедренный",
                              2.0, 2.0);

        Console.WriteLine("Информация о t1: ");
        t1.showStyle();
        t1.showDim();
        t1.showColor();
        Console.WriteLine("Площадь равна " + t1.area());
        Console.WriteLine();
        Console.WriteLine("Информация о t2: ");
        t2.showStyle();
        t2.showDim();
        t2.showColor();
        Console.WriteLine("Площадь равна " + t2.area());
    }
示例#2
0
    public static void Main()
    {
        ColorTriangle t1 = new ColorTriangle("Blue", "right", 8.0, 12.0);
        ColorTriangle t2 = new ColorTriangle("Red", "isosceles", 2.0, 2.0);

        Console.WriteLine("Info for t1: ");
        Console.WriteLine("Area is " + t1.area());
        t1.showStyle();
        t1.showDim();
        t1.showColor();


        Console.WriteLine();

        Console.WriteLine("Info for t2: ");
        Console.WriteLine("Area is " + t2.area());
        t2.showStyle();
        t2.showDim();
        t2.showColor();



        //   t1.showdim_();
    }