PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which lines of code should you add to your report?

You create Microsoft Windows-based applications. You are designing the integration test for an application. You write the following lines of code. (Line numbers are included for reference only.)

01 private void cmdCompare_Click(object sender, EventArgs e) { 02 decimal flightFare, carRental, hotelPrice, travelCost; 03 flightFare = wsFlyHigh.GetBestFare(txtOrigin.Text, txtDest.Text, datDateOut, datDateBack); 04 cmdGetRentalPrice.Parameters.Add(“@DAYS”,SqlDbType.Int); 05 cmdGetRentalPrice.Parameters[0].Value=int.Parse(txtDays.Text); 06 carRental = cmdGetRentalPrice.ExecuteScalar();
07 hotelPrice = bigDeal.GetHotelPrice(int.Parse(txtDays.Text)); 08 travelCost = flightFare + carRental + hotelPrice;
09 txtTravelCost.Text = travelCost.ToString(“C”);
10 }

You analyze the code and discover the following features:

wsFlyHigh is a Web service that is hosted on a partners extranet. cmdGetRentalPrice runs a stored procedure on a corporate database server.
bigDeal is a COM component.

You need to create a report that lists the parts of the code to be considered during integration testing.
Which lines of code should you add to your report?

What change should you suggest?

You create Web-based client applications. You are reviewing a Web application page that populates a list of all employees of your company. You analyze code and find that the Web application page does not prevent exceptions from traveling to the browser. You need to ensure that the Web application page intercepts exceptions and presents an error message to the browser. What change should you suggest?

Which code fragment should you insert at line 03?

You are creating a Virtual Earth 6.0 application. The Web pages of the application contain a header section, a body section, and a map control section.

The body section of the Web pages contains the following code fragment. (Line numbers are included for reference only.)

01 <div id=’Header’ style=”width:400px;
02 height:100px; background-color: red;”></div>
03 …
04 <div id=’Controls’ style=”width:400px;”>
05 <p align=”center”>Search text:
06 <input type=’text’ id=’Where’ />
07 <input type=’button’ id=’Search’ value=’Search’
08 onclick=”Find();” />
09 </p>
10 </div>

You need to ensure that the maps contained on the Web pages fit correctly between the header section and the map control section.

Which code fragment should you insert at line 03?

What should you do?

You create Microsoft Windows-based applications. You design a composite user control that is used to enter e-mail addresses. The control is as shown in the following exhibit. (Refer to the Exhibit.) The control validates the user input by using a regular expression. The control validates e-mail addresses and prevents the user from submitting blocked e-mail addresses. The control must permit the user to correct the entry if the user enters a blocked e-mail address. You need to provide feedback if the user enters a blocked e-mail address in the txtEmailAddress text box. What should you do?

Which three actions should you perform?

You create Web-based client applications. Your company has an existing ASP.NET application that is currently deployed on a single server. The application manages state by using session variables and ViewState. The number of users for the application has significantly increased. You need to configure the application to accommodate the significantly increased traffic and to recover transparently from hardware failure. Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.)

Which code fragment should you use?

You are creating a Web application by using the Virtual Earth 6.0 map control.

A Web page of the application provides links to a number of pre-defined locations. The application must meet the following requirements:

The links can be shared.
The links are encoded with map properties.
Users can copy the links to the Windows clipboard.

You need to write code to meet the requirements.

Which code fragment should you use?

Which two actions should you perform?

You are creating a Microsoft Office SharePoint Server 2007 application. The
application reads data from the Microsoft Office Excel 2007 workbook named SalesGoals.xls.

SalesGoals.xls is located in a document library. The first sheet of the SalesGoals.xls workbook contains
the following information.

You need to retrieve the values for 2008 from within your application.

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