What should you do?
You are designing a component for a Windows Forms application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5. The component will process a long-running business transaction. You plan to provide the status of completion of the transaction to the users. You need to ensure that the application displays a progress bar that reports the percentage of completion of the transaction. You need to achieve this goal without using the polling method.
What should you do?
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. The design of applications forms part of your responsibilities at Domain.com. Domain.com operates as an on-line retailer.
You are currently developing a distributed order fulfillment system. When completed, this system must, when an order is placed, first invoke a method on one Web service to charge a customer’s credit card. Then the system must continue and invoke methods on another Web service to ship the purchased product. Finally the system must update an internal accounting database. You need to propose the appropriate component type and layer that must be used to meet the Domain.com requirements.
What should you do? (Each correct answer presents art of the solution. Choose two.)
Which function should you call?
You have a stream interface device driver and an application. You need to open the driver from the application. Which function should you call?
What should you do?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You write the following code fragment. (Line numbers are included for reference only.)
01 <asp:UpdatePanel ID=”upnData” runat=”server”
02 ChildrenAsTriggers=”false” UpdateMode=”Conditional”>
03 <Triggers>
04
05 </Triggers>
06 <ContentTemplate>
07 <!– more content here –>
08 <asp:LinkButton ID=”lbkLoad” runat=”server” Text=”Load”
09 onclick=”lbkLoad_Click” />
10 <asp:Button ID=”btnSubmit” runat=”server” Text=”Submit”
11 Width=”150px” onclick=”btnSubmit_Click” />
12 </ContentTemplate>
13 </asp:UpdatePanel>
14 <asp:Button ID=”btnUpdate” runat=”server” Text=”Update”
15 Width=”150px” onclick=”btnUpdate_Click” />
You need to ensure that the requirements shown in the following table are met.
What should you do?
segment should you use?
You create an application by using the Microsoft .NET Framework 3.5 and Microsoft
ADO.NET.The application uses the following LINQ query.
var query = from o in orderLinesQuery
where (string)o[“CarrierTrackingNumber”] == “AEB6-4356-80”
select new
{
SalesOrderID = o.Field<int>(“SalesOrderID”),
OrderDate = o.Field<DateTime>(“OrderDate”)
};
The CarrierTrackingNumber field in the DataRow is nullable.You need to ensure that an
exception does not occur if the CarrierTrackingNumber field has a null value.Which code
segment should you use?
What should you do?
You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. The service will be hosted in a managed Console application. The service endpoint has an address that is relative to the base address of the service. You need to programmatically add the base address to the service. What should you do?
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. The design of applications forms part of your responsibilities at Domain.com. Domain.com operates as the local municipal traffic authority in Miami. You have been instructed to develop an enterprise application for Domain.com. Following is a list of all the requirements that you should keep in mind when you develop the application:
1. In the event of a driver exceeding the speed limit by more than 10 and less than 20 kilometers per hour (KPH) – the corresponding fine should be $100 with an additional amount of $10 for each KPH over the limit.
2. In the event of a driver exceeding the speed limit by 20 or more KPH, the corresponding fine should be $250 with an additional $25 for each KPH over the limit.
To this end you write the following pseudo-code to address the requirements:
DECLARE speedLimit INTEGER
DECLARE speed INTEGER
DECLARE fine INTEGER
Now you need to complete the pseudo-code.
What should you do? (Choose the correct code segment.)
What should you do?
You implement a stream interface driver for a peripheral device and define the standard stream interface functions. You need to add support for the Power Manager to the driver.
What should you do?
Which code segment should you insert at line 06?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a login Web form by using the following code fragment.
<asp:ScriptManager ID=”ScriptManager1″ runat=”server” />
<asp:TextBox runat=”server” ID=”txtUser” Width=”200px” />
<asp:TextBox runat=”server” ID=”txtPassword” Width=”200px” />
<asp:Button runat=”server” ID=”btnLogin” Text=”Login” OnClientClick=”login(); return false;” />
When a user clicks the btnLogin Button control, the login() client-side script is called
to authenticate the user. The credentials provided in the TextBox controls are used to
call the client-side script.
You also add the following client-script code fragment in the Web form. (Line numbers
are included for reference only.)
01 <script type=”text/javascript”>
02 function login() {
03 var username = $get(‘txtUser’).value;
04 var password = $get(‘txtPassword’).value;
05
06 // authentication logic.
07 }
08 function onLoginCompleted(validCredentials, userContext,
09 methodName)
10 {
11 // notify user on authentication result.
12 }
13
14 function onLoginFailed(error, userContext, methodName)
15 {
16 // notify user on authentication exception.
17 }
18 </script>
The ASP.NET application is configured to use Forms Authentication. The ASP.NET AJAX authentication service is activated in the Web.config file.
You need to ensure that the following workflow is maintained:
– On successful authentication, the onLoginCompleted client-script function is called to notify the user.
– On failure of authentication, the onLoginFailed client-script function is called to display an error message.
Which code segment should you insert at line 06?
<?xml version="1.0" encoding="utf-8" ?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework
version 3.5.You add an XmlDataSource control named XmlDataSource1 to the Web page.
XmlDataSource1 is bound to an XML document with the following structure.
<?xml version=”1.0″ encoding=”utf-8″ ?>
<clients>
<client ID=”1″ Name=”John Evans” />
<client ID=”2″ Name=”Mike Miller”/>
…
</clients>
You also write the following code segment in the code-behind file of the Web page.
protected void BulletedList1_Click(object sender, BulletedListEventArgs e) {
//…
}
You need to add a BulletedList control named BulletedList1 to the Web page that is bound
to XmlDataSource1.Which code fragment should you use?