Black Friday Sale Special - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sntaclus

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. You create an application for the company. You need to validate the phone number passed to a class as a parameter in the application. Which of the following is the most effective way to verify that the format of the data matches a phone number?

A.

A try/catch block

B.

Use the String.Length property

C.

Nested If statements

D.

Regular expressions

You work as a Software Developer for ABC Inc. You create a SQL server database named DATA1 that will manage the payroll system of the company. DATA1 contains two tables named EmployeeData and Department. While EmployeeData records detailed information of the employees, Department stores information about the available departments in the company. EmployeeData consists of columns that include EmpID, EmpName, DtOBrth, DtOJoin, DeptNo, Desig, BasicSal, etc. You want to ensure that each employee ID is unique and is not shared between two or more employees. You also want to ensure that the employees enter only valid department numbers in the DeptNo column. Which of the following actions will you perform to accomplish the task?

Each correct answer represents a part of the solution. Choose all that apply.

A.

Define views in the database.

B.

Add constraints to the EmployeeData table.

C.

Define triggers in the EmployeeData table.

D.

Define indexes in the EmployeeData table.

E.

Add stored procedures by using Transact-SQL queries.

Richard works as a Software Developer for BlueWell Inc. He is writing a component that will be shared by multiple applications. He wants to install the component in the GAC (Global Assembly Access) To install a component in the GAC, he requires to provide a strong name to the component. Which of the following tools will he use to accomplish this task?

A.

Al.exe

B.

Sn.exe

C.

Cert2spc.exe

D.

Signcode.exe

E.

Gacutil.exe

John works as a Web Developer for ProMetaworks Inc. He creates an ASP.NET application, named MyApp1, using Visual Studio .NET. MyApp1 contains a page, named Page1. Page1 contains several TextBox controls that accept users' input. John uses several validation controls on the page to validate input controls. He wants to display all the validation error messages on the page in a message box. However, he does not want the validation summary to be displayed inline on the Web page. What will he do to accomplish the task?

A.

Add a ValidationSummary control to the page. Set its ShowMessageBox and ShowSummary properties to true.

B.

Add a ValidationSummary control to the page. Set its DisplayMode property to MessageBox .

C.

Add a ValidationSummary control to the page. Set its ShowMessageBox property to true and ShowSummary property to false.

D.

Add a CustomValidator control to the page. Write a custom client-side script function. Set the ClientValidationFunction property of the control to the name of the function.

You work as a Software Developer for ABC Inc. The company has several branches worldwide. The company uses Visual Studio .NET 2005 as its application development platform. You are creating an application using .NET Framework 2.0. The application will be used by all the branches of the company. You are using the CompareInfo class for culture-sensitive string comparisons. You write the following code in the application:

String s1 = "C rtify";

String s2 = "c rtify";

String s3 = "c rtify";

You need to compare the s1 string with the s2 string and ensure that the string comparison must ignore case. Which of the following code segments will you use to accomplish the task?

A.

CompareInfo cmp = CultureInfo.InvariantCulture.CompareInfo;

Console.WriteLine(cmp.Compare(s1, s2, CompareOptions.Ordinal));

B.

CompareInfo cmp = CultureInfo.InvariantCulture.CompareInfo;

Console.WriteLine(cmp.Compare(s1, s2, CompareOptions.None));

C.

CompareInfo cmp = CultureInfo.InvariantCulture.CompareInfo;

Console.WriteLine(cmp.Compare(s1, s2, CompareOptions.IgnoreCase));

D.

CompareInfo cmp = CultureInfo.InvariantCulture.CompareInfo;

Console.WriteLine(cmp.Compare(s1, s2, CompareOptions.OrdinalIgnoreCase));

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2008 as its application development platform. You create an ASP.NET Web application using the .NET Framework 3.5. 91. The application uses ASP.NET AJAX, and you need to deploy it in a Web farm environment. You are required to configure SessionState for the application. Which of the following code segments will you use to accomplish this task?

A.

B.

C.

D.

You work as an Enterprise Application Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You create a logging utility class using .NET Framework 3.5. The utility class writes logs to event log services. You are required to ensure that the client applications that use the utility class can create an instance of the utility class only if they have access rights to write to the event log services.

What will you do?

A.

Use role based security in the class constructor.

B.

Use declarative security check on the assembly.

C.

Use role based security on the class.

D.

Use code access security on the class.

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You are creating an ASP.NET Web application using .NET Framework 3.5. The application will be accessed by Internet users. You need to enable users to authenticate from the client-side script. You add the following code fragment in the Web.config file of the application:

You must configure the application to ensure that user credentials are validated against Active Directory by using the client-side script. What will you do to accomplish this?

Each correct answer represents a part of the solution. Choose two.

A.

Add the following code fragment to the Web.config file of the application:

B.

Configure the application to use the ActiveDirectoryMembershipProvider class.

C.

Add the following code fragment to the Web.config file of the application:

D.

Configure the application to use the SqlMembershipProvider class.

E.

Add the following code fragment to the Web.config file of the application:

Sam works as a Software Developer for GenTech Inc. He deploys an ASP.NET application on a server. When an error occurs, users are redirected to a custom error page that is specified in the Web.config file. Users report that a particular page repeatedly generates errors. Sam wants to gather detailed information about the error on this page. He also wants to ensure that users continue to be redirected to the custom error page, if the requested pages generate errors. What will Sam do to accomplish this?

A.

In the Web.config file, set the mode attribute of the customErrors element to RemoteOnly.

Access the page from a browser on the server.

B.

Modify the Web.config file to include the following element:

Access the application from a browser on a client computer.

C.

In the Web.config file, set the mode attribute of the customErrors element to RemoteOnly.

Access the page from a browser on a client computer.

D.

Modify the @ Page directive so that the Trace and the LocalOnly attributes are set to true.

Access the page from a browser on the server.

Which of the following code snippets is an example of tight encapsulation?

A.

private int x;

public void fun(){x=5;}

B.

private int x;

private void fun(){x=5;}

C.

public int x;

public void fun() {x=5;}

D.

protected int x;

protected void fun(){x=5;}

E.

int x;

public void fun(){x=5;}