logo

Crowdly

Browser

Add to Chrome

Вихідний модуль містить код: class Rectangle { double width = 0.0, hight =...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Вихідний модуль містить код:

class Rectangle

{ double width = 0.0, hight = 0.0, s = 0,0;

string t = "Прямокутник";

public Rectangle (double w, double h) {width = w; hight = h; s = w * h; }

public Rectangle (double side): this (side, side) {t = "Квадрат"; }

public Rectangle(): this (1.0, 1.0) {t = "Точка"; }

public string RectForm() {return string.Format ( "{0}: площа = {1}", t, s); }

}

class Program

{ static void Main ()

{Rectangle k = new Rectangle (10); Rectangle t = new Rectangle();

System.Console.Write (k.RectForm() + t.RectForm());

}

}

Вкажіть результат виведення на консоль після спроби запустити програму на компіляцію і виконання:

C# oop_class

More questions like this

Want instant access to all verified answers on moodle.chnu.edu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome