logo

Crowdly

Browser

Add to Chrome

Проаналізуйте наведений код. class TwoD { int x, у; public TwoD() {x = ...

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

Проаналізуйте наведений код.

class TwoD

{ int x, у;

public TwoD() {x = у = 0; }

public TwoD (int i, int j) {x = i; у = j; }

public static bool operator true (TwoD op)

{ if ((op.x! = 0) || (op.у! = 0)) return true;

else return false;

}

public static bool operator false (TwoD op)

{ if ((op.x == 0) && (op.у == 0)) return true;

else return false;

}

}

class Program

{ рublic static void Main ()

{TwoD точка = new TwoD (5, 6);

if (_______________) System.Console.Write ( "точка-ІСТИНА");

else System.Console.Write ( "точка-ХИБНА");

}}

Потрібно вивести рядок точка-ІСТИНА. Серед перерахованих нижче кодів вкажіть код, підстановка якого замість знаків підкреслення дозволяє отримати програму, вирішальну поставлене завдання:

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