What are two possible ways to achieve this goal?

You are testing an application. The application includes methods named CalculateInterest
aid LogLine. The CalculateInterest () method calculates loan interest. The LogLine() method
sends diagnostic messages to a console window.
The following code implements the methods. (Line numbers are included for reference only.)

You have the following requirements:
The Calculatelnterest() method must run for all build configurations.
The LogLine() method must run only for debug builds.
You need to ensure that the methods run correctly.
What are two possible ways to achieve this goal? (Each correct answer presents a complete
solution. Choose two.)

You are testing an application. The application includes methods named CalculateInterest
aid LogLine. The CalculateInterest () method calculates loan interest. The LogLine() method
sends diagnostic messages to a console window.
The following code implements the methods. (Line numbers are included for reference only.)

You have the following requirements:
The Calculatelnterest() method must run for all build configurations.
The LogLine() method must run only for debug builds.
You need to ensure that the methods run correctly.
What are two possible ways to achieve this goal? (Each correct answer presents a complete
solution. Choose two.)

A.
Insert the following code segment at line 01:
#region DEBUG
Insert the following code segment at line 10:
#endregion

B.
Insert the following code segment at line 10:
[Conditional(MDEBUG”)]

C.
Insert the following code segment at line 05:
#region DEBUG
Insert the following code segment at line 07:
#endregion

D.
Insert the following code segment at line 01:
#if DE30G
Insert the following code segment at line 10:
#endif

E.
Insert the following code segment at line 01:
[Conditional(MDEBUG”)]

F.
Insert the following code segment at line 05:
#if DEBUG
Insert the following code segment at line 07:
#endif

G.
Insert the following code segment at line 10:
[Conditional(“RELEASE”)]



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Mr D

Mr D

Only F is right, and I have no idea where it come from the [Conditional(MDEBUG”)]

John

John

F is right, you don’t need B.

B is not right without F

Artem

Artem

Check you this?
B work without F
F work without B
Answer is B and F