You work as the Enterprise application developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers in the domain run Windows Server 2003. Your responsibilities at Domain.com include the testing and stabilization of applications. Domain.com operates in the Inland Revenue services department. You are currently performing a code review for an income tax filing application. In the code review you examine the following code:
while (true)
{
TaxForm form = taxForm.Instance;
if (form = = null)
break;
Schedule schedule = form.Schedule;
if (schedule = = null)
break;
Worksheet worksheet = schedule.Worksheet;
if (worksheet = = null)
break;
worksheet.Clear();
break;
}
The code is meant to clear a worksheet. Now you need to check whether the code has any problems with its semantics.
What conclusion can you draw?
A.
The code has no problems.
B.
The code has problems as you need to pass the value false to the while expression.
C.
The code has problems as execution will occur in an infinite loop.
D.
The code review failed as the Clear method of the Worksheet class will never get called.