which the locations displayed on the map must lie. How should you define the boundary?
You are creating a Virtual Earth 6.0 application that retrieves locations from a Microsoft SQL Server 2005 database. A stored procedure will be used to retrieve only locations that lie within the currently displayed map area. You need to define the boundary within which the locations displayed on the map must lie. How should you define the boundary?
What should you do?
You are creating a Microsoft Office SharePoint Server 2007 Report Center Web site. Your company stores product data in a Microsoft SQL Server 2005 database named Product Management. You need to ensure that the product data is available for use in Microsoft Office Excel 2007 reports. What should you do?
Which XML fragment should you use?
You create a site definition named HR Team Site and a list definition named HR Roles.
The HR Team Site definition is configured in the following manner.
< Configuration ID=”13″ Title=”HR Team Site” Type=”0″/ >
The HR Roles list definition is configured in the following manner.
< ListTemplate Path=”STS” Name=” hrteam “
DisplayName =”HR Roles” Type=”112″ BaseType =”1″ / >
You need to ensure that the HR Team Site definition is configured to use the HR Roles list definition.
Which XML fragment should you use?
Which line of code should you use to replace the code on line 06?
You create Microsoft Windows-based applications. You review code for an application that is developed for a bank. You need to test a method named Deposit in one of the application components. The following code segment represents the Deposit method. (Line numbers are included for reference only.)
01 public void Deposit(decimal amount) {
03 if (!(amount > 0)) {
04 throw new Exception(“Invalid deposit amount!”);
05 } else {
06 this.balance += amount;
07 }
08 }
You use the Microsoft Visual Studio 2005 test feature to automatically generate the following unit test.
(Line numbers are included for reference only.)
01 [TestMethod()]
02 public void DepositTest() {
03 BankAccount target = new BankAccount(); //balance will be ZERO
04 decimal amount = 100;
05 target.Deposit(amount);
06 Assert.Inconclusive
(“A method that does not return a value cannot be verified.”); 07 }
You need to change the test method to return a conclusive result. Which line of code should you use to replace the code on line 06?
What should you do?
You create an Office Visio 2007 solution that consists of an add-in DLL for Visio 2007, a Visio 2007 stencil, and a Visio 2007 template. You need to ensure that the Visio 2007 solution can be deployed for the English, German, and Italian language versions of Visio 2007. What should you do?
What should you conclude?
You create Web-based applications. You create a loan application form. The loan application form is used to calculate the monthly payment of loans. The monthly payment is based on the loan amount, rate, and number of months. The form contains four text boxes and a button. There are no other controls in the form. The application event handler has the following lines of code. (Line numbers are included for reference only.)
01 protected void GetPayment(object sender, EventArgs e) { 02 try {
03 decimal rate = decimal.Parse(txtRate.Text);
04 decimal loanAmount = decimal.Parse(txtLoan.Text);
05 int period = int.Parse(txtPeriod.Text);
06 decimal payment = CalcPayment(rate, loanAmount, period); 07 txtPayment.Text = payment.ToString(“C”);
08 }
09 catch (OverflowException ex) {
10 …
11 }
12 catch (InvalidCastException ex) {
13 …
14 }
15 catch (Exception ex) {
16 …
17 }
18 }
You must prevent exceptions whenever possible to meet the application requirements. You need to evaluate the current exception handling mechanism. What should you conclude?
var pos=location.search.indexOf("?
You are creating a Web application. You are given the URL of a Web page. When the URL is encoded with map control properties, it generates custom maps by using the Virtual Earth 6.0 map control.
The Web page uses the following JavaScript code segment to decode the URL.
var pos=location.search.indexOf(“?”) +1;
var loc1=location.search.substr(pos);
var point1=loc1.split(” & “);
var a= point1[0];
var b= point1[1];
var c= point1[2];
var d=point1[3];
var e= point1[4];
var f= point1[5];
var g= point1[6];
map=new VEMap(‘myMap’);
map.LoadMap(new VELatLong(a,b),c,d,e,f,g);
You need to encode the URL to generate a custom map by using your own settings.
Which encoded URL should you use?
Which code segment should you use on line 5?
You plan to create a custom application that automatically creates key word best bets.
You write the following code:
01: Dim site As New SPSite(“http://internet”)
02: Dim searchContext_1 as SearchContext = SearchContext.getContext(site)
03: Dim keyWords as new KeyWord(searchContext_1, newURI(“http://internet”))
04: Dim currentKeyWord as keyWords = KeyWords.AllKeywords.Create(“AKeyWord”, DateTime.Now)
05:
You need to add a best bet to the current keyword. Which code segment should you use on line 5?
Which two actions should you perform?
You create a Microsoft Windows SharePoint Services site.
You need to ensure that the Web Parts can access the object model of Windows SharePoint Services.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Which two actions should you recommend?
You create Microsoft Windows-based applications. You receive the following code segment to review. (Line numbers are included for reference only.) 01 public partial class frmReceivables : Form
02 {
03 private DataSet ds;
04 public frmReceivables()
05 {
06 InitializeComponent();
07 }
08 private void frmReceivables(object sender, EventArgs e) 09 {
10 SqlConnection cn = new SqlConnection(strConnectionString); 11 SqlDataAdapter daInvoices = new SqlDataAdapter(“SELECT * FROM Invoices”, cn); 12 SqlDataAdapter daCustomers = new SqlDataAdapter(“SELECT * FROM Customers”, cn); 13 ds = new DataSet(“Receivables”);
14 daInvoices.Fill(ds);
15 daCustomers.Fill(ds);
16 }
17 }
The strConnectionString variable is pre-populated from the application configuration file. Query statements will remain unchanged throughout the life cycle of the application. Connection pooling is not being used. This code segment accesses a Microsoft SQL Server 2000 database. The ds dataset is bound to a data grid view so that users can view and update data in the database. The code currently compiles correctly and works as intended. You need to enhance performance and reliability for this code. Which two actions should you recommend? (Each correct answer presents part of the solution. Choose two.)