PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

What should you do?

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 design and development of applications. Domain.com operates as a Geographic Positioning System service provider. You are currently developing a geographical mapping application. You must create a struct named Waypoint that models a waypoint. This waypoint is to consist of a set of latitude and longitude coordinates. In the event of a user passing a street address to the struct, it must perform a location lookup and set its coordinates appropriately.
To this end you need to define the Waypoint struct. You need to ensure that your application requires the least amount of code to set the coordinates from a street address.

What should you do? (Choose the correct code segment.)

Which method should you use?

You are creating an ASP.NET application by using the .NET Framework 3.5.
You create an AJAX Web form in the application.
You create an ASP.NET AJAX client-component class in the Web form.
The class will be used in a JavaScript function in the Web form.
You plan to debug the JavaScript function.
You need to display all the fields of the AJAX client-component object in the trace console in the Web form by using the minimum amount of code.

Which method should you use?

Which code segment should you insert at line 04?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft
ADO.NET. The application uses a Microsoft SQL Server 2005 database. The application
contains a DataSet object that contains two DataTable objects. The DataTable objects
reference the Customers and Orders tables in the database. You write the following code
segment. (Line numbers are included for reference only.)
01 DataSet custOrderDS = new DataSet();
02 custOrderDS.EnforceConstraints = true;
03 ForeignKeyConstraint custOrderFK =
new ForeignKeyConstraint(“CustOrderFK”,
custOrderDS.Tables[“Customers”].Columns[“CustomerID”],
custOrderDS.Tables[“Orders”].Columns[“CustomerID”]);
04
05 custOrderDS.Tables[“Orders”].Constraints.Add(custOrderFK);
You need to ensure that an exception is thrown when you attempt to delete Customer
records that have related Order records.Which code segment should you insert at line 04?

Which method should you use ?

You create an application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5. The application includes a server component that receives DataTable objects from client components. Each DataTable object contains approximately 2,500,000 rows. The server component must load new and updated records from the DataTable objects into a table in a Microsoft SQL Server 2005 database. The schemas of the database table and the DataTable objects are identical. The database is located on a different server than the application server component. You need to identify a method that provides the best performance to load the data into the database table. Which method should you use ?

What should you do?

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 design and development of applications. You are currently developing a Microsoft Windows service that will form part of an enterprise solution for Domain.com. The service must be able to (1) Monitor a File Transfer Protocol (FTP) directory for incoming files, and (2) Extract data from the files and import them into a database.
Following are the requirements that should be met by this service:
1. It must run using a least privileged account.
2. It must be capable of processing 450 files per minute.
3. It must be able to recover from failures that cause it to stop functioning. You thus need to identify the factor that is most important during the design of the application.

What should you do?

Which storage mechanism should you use to store the shopping cart data?

You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will not be deployed on a Web farm or a Web garden scenario.

The application must meet the following requirements:
It stores shopping cart data for each user for the entire lifetime of an active session.
The shopping cart data can be stored regardless of browser settings.

You need to ensure optimal performance of the application for the shopping cart
functionality.

Which storage mechanism should you use to store the shopping cart data?

Which code segment should you insert at line 04?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework
version 3.5.You add a Web form that contains the following code fragment.
<asp:GridView ID=”gvProducts” runat=”server” AllowSorting=”True”

DataSourceID=”Products”>
</asp:GridView>
<asp:ObjectDataSource ID=”Products” runat=”server” SelectMethod=”GetData”
TypeName=”DAL” />
</asp:ObjectDataSource>
You write the following code segment for the GetData method of the DAL class. (Line
numbers are included for reference only.)
01 public object GetData() {
02 SqlConnection cnn = new SqlConnection();
03 string strQuery = “SELECT * FROM Products”;
04
05 }
You need to ensure that the user can use the sorting functionality of the gvProducts
GridView control.Which code segment should you insert at line 04?

What should you do?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. Client applications receive the original fault messages that the service generates. You need to create a custom service behavior to add a fault message handler to all channel dispatchers. What should you do?