What should you recommend?

You are an enterprise application developer. You create a Microsoft Windows client application that communicates with a business layer component. The business layer component contains the following class, named Utility.

public class Utility
{
public Utility()
{
}
public void ChangeData()
{
}
}

The application must fulfill the following criteria:

* Instances of the Utility class must be created only within the business component.
* The Windows client application must be able to invoke the functions inside the Utility class.

You review the code for the Utility class and decide it requires modification. You need to recommend modifications for the code.
What should you recommend?

You are an enterprise application developer. You create a Microsoft Windows client application that communicates with a business layer component. The business layer component contains the following class, named Utility.

public class Utility
{
public Utility()
{
}
public void ChangeData()
{
}
}

The application must fulfill the following criteria:

* Instances of the Utility class must be created only within the business component.
* The Windows client application must be able to invoke the functions inside the Utility class.

You review the code for the Utility class and decide it requires modification. You need to recommend modifications for the code.
What should you recommend?

A.
Change the scope of the constructor to private.

B.
Change the scope of the constructor to internal.

C.
Change the scope of the Utility class to private.

D.
Change the scope of the Utility class to internal.



Leave a Reply 0

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