PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

You need to ensure that the user interface (UI) of the application dynamically changes the application theme b

You are designing an application by using Windows Presentation Foundation (WPF) and
Microsoft .NET Framework 4. The application will run on Windows 7-based kiosks that are
located indoors and outdoors. The kiosk displays have a photo sensor that will update the
application with the current ambient luminosity. You need to ensure that the user interface
(UI) of the application dynamically changes the application theme based on the ambient
luminosity. What should you use?

Which approach should you recommend?

You are designing a data access service backed by Microsoft SQL Server. Other
developers will use your service as a third-party service. You have the following
requirements: To reduce maintenance cost, you must write the minimal amount of code
required for fulfilling the goals. The service must function with Microsoft and non-Microsoft
technologies. The service must implement the WS-Security standards. You need to design
the service to meet the requirements. Which approach should you recommend?

You need to edit the ad.contoso.com domain Group Policy object (GPO) to enable users in the ad.contoso.com dom

Your company has an Active Directory domain named ad.contoso.com. All client computers run
Windows 7. The company has recently acquired a company that has an Active Directory domain
named ad.fabrikam.com. A two-way forest trust is established between the ad.fabrikam.com
domain and the ad.contoso.com domain. You need to edit the ad.contoso.com domain Group Policy
object (GPO) to enable users in the ad.contoso.com domain to access resources in the
ad.fabrikam.com domain. What should you do?

You need to log performance counter data from Server1 to a SQL database

DRAG DROP
Your network contains a server named Server1 that runs Windows Server 2008 R2. You need to log
performance counter data from Server1 to a SQL database. What should you do?
To answer, move the appropriate actions from the Possible Actions list to the Necessary Actions area
and arrange them in the correct order.

Which XPath expression should you use?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application contains the following XML fragment.
<ApplicationMenu>
<MenuItem name=”File”>
<MenuItem name=”New”>
<MenuItem name=”Project” />
<MenuItem name=”Web Site” />
</MenuItem>
<MenuItem name=”Open”>
<MenuItem name=”Project” />
<MenuItem name=”Web Site” />
</MenuItem>
<MenuItem name=”Save” />
</MenuItem>
<MenuItem name=”Edit”>
<MenuItem name=”Cut” />
<MenuItem name=”Copy” />
<MenuItem name=”Paste” />
</MenuItem>
<MenuItem name=”Help”>
<MenuItem name=”Help” />
<MenuItem name=”About” />
</MenuItem>
</ApplicationMenu>
The application queries the XML fragment by using the XmlDocument class. You need to select all
the descendant elements of the MenuItem element that has its name attribute as File. Which XPath
expression should you use?

You need to add a function that returns the number of years since a person was hired

You use Microsoft visual studio 2010 and Microsoft NET Framework 4 to create an Application. The
application uses the ADO NFT Entity Framework to model entities. The model includes the entity
shown in the following exhibit.

You need to add a function that returns the number of years since a person was hired. You also need
to ensure that the function can be used within LINQ to Entities queries. What should you do?

Which code segment should you add?

The database contains a table named Categories. The Categories table has a primary key identity
column named CategoryID.
The application inserts new records by using the following stored procedure.
CREATE PROCEDURE dbo.InsertCategory
@CategoryName nvarchar(15),
@Identity int OUT
AS
INSERT INTO Categories (CategoryName) VALUES(@CategoryName)
SET @Identity = SCOPE_IDENTITY()
RETURN @@ROWCOUNT
You write the following code segment.
SqlDataAdapter adapter = new SqlDataAdapter(“SELECT categoryID, CategoryName FROM
dbo.Categories”,connection);
adapter.InsertCommand = new SqlCommand(“dbo.InsertCategory”, connection);
adapter.InsertCommand.CommandType = commandType.StoredProcedure;
adapter.InsertCommand.Parameters.Add(new SqlParameter(“@CategoryName”, SqlDbType.
NVarChar, 15,”CategoryName”));
You need to retrieve the identity value for the newly created record.
Which code segment should you add?