PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which code segment should you insert at line 13?

You are creating a Microsoft Office SharePoint Server 2007 Web Part.

You write the following code segment. (Line numbers are included for reference only.)

01 public Button cmdCrawl;
02 protected override void CreateChildControls()
03 {
04 cmdCrawl = new Button();
05 cmdCrawl.Click += new EventHandler(cmdCrawl_Click);
06 cmdCrawl.Text = “Update Index”;
07 }

08 public void cmdCrawl_Click(object sender, EventArgs e)
09 {
10 Microsoft.Office.Server.Search.Administration.Content sspContent =
11 new Microsoft.Office.Server.Search.Administration.Content
12 (SearchContext.Current);
13 …

14 }

You need to ensure that the Web Part initiates a search crawl of a scope named Patents.

Which code segment should you insert at line 13?

Which two actions should you perform?

You create a custom administration page for a Microsoft Windows SharePoint Services application.

The page is throwing a security exception. You verify that you have administrator rights on the Microsoft Windows SharePoint Services server.

You need to ensure that the page can be used to perform administrative functions.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

Which user interface layout control should you select?

You create Microsoft Windows-based applications. You are developing an application for the sales department.

The application displays information under the following sections:

Customer Name
Shipping Address
Billing Address
Contact Numbers
E-mail Addresses

You need to design a user interface that permits the user to display one section at a time. You want to achieve this goal by using the minimal amount of code. Which user interface layout control should you select?

Which lines are covered by the test?

You create Web-based client applications. You create a Web site that will be used to simulate different types of loans. You are writing a method to calculate the payment on a simple loan. You write the following lines of code for the method. (Comments are included for reference only.)

public static decimal Payment(decimal loanAmount, int period, decimal rate) { if (!(loanAmount > 0)||!(period > 1)||!(rate > 0)) { // Line A throw new Exception(“Invalid input!”); // Line B
} else {
return 0M; // Line C: return a calculated payment
}
}
public static decimal CheckBalance(ulong accountID) {
return 0M; // Line D: return calculated balance
}

You write the following code for the unit test.

[TestMethod()]
public void PaymentTest() {
decimal payment = Loan.Payment(100000,360,10); // Line E
Assert.AreEqual(payment, 877.57M); // Line F
}

You enable coverage testing for this unit test. You need to identify the coverage of your test. Which lines are covered by the test?

Which code segment should you use?

You are creating a Web Part for a Microsoft Windows SharePoint Services site named Site1. You install a feature named TimeFeature on Site1.

You write the following code segment.

Dim site As SPSite = New SPSite(“http://server/site1”)
Dim web As SPWeb = site.OpenWeb

You need to display the current time to the user only if the TimeFeature feature is activated on Site1.

Which code segment should you use?

What should you do?

You create Microsoft Windows-based applications. You design a Windows Forms application that routes incidents to the most appropriate technical support representative. The application displays information in a Multiple Document Interface (MDI). A standard menu exists at the top of the MDI parent form. Toolbar containers provide functionality to the child forms. Users of the application are connected to the network locally and remotely. Five of the remote users have either visual or auditory impairments. Currently, a default beep alerts the users when a new support incident is assigned to them. You review the design and discover that the application fails to provide adequate
accessibility functionality. You need to provide an application status feedback technique that is appropriate for all users. What should you do?