PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which line of code should replace the code on line 09 of the unit test?

You create Web-based applications. You are creating an Internet banking application. You write the following lines of code to represent a method in your application. (Line numbers are included for reference only.)

01 public void Transfer(decimal amount, BankAccount account) 02 {
03 if (!(amount > 0))
04 throw new Exception(“Invalid deposit amount!”);
05 else
06 {
07 this.Withdraw(amount);
08 account.Deposit(amount);
09 }
10 }

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 TransferTest()
03 {
05 BankAccount target = new BankAccount();
06 BankAccount transferTo = new BankAccount();
07 target.Deposit(500);
08 target.Transfer(100,transferTo);
09 Assert.Inconclusive(“A method that does not return a value cannot be verified.”); 10 }

You need to change the test method to return a conclusive result. Which line of code should replace the code on line 09 of the unit test?

Which code segment should you insert at line 12?

You are creating a Virtual Earth 6.0 map. You use a page template that has a transparent header. You write the following HTML fragment to define the template.
01 <head>
02 <script type=”text/javascript”>
03 var map = null;
04 function GetMap(){
05 FormatMap();
06 map = new VEMap(‘Map’);
07 map.LoadMap();
08 }
09 function FormatMap(){
10 var mapEl = document.getElementById(‘Map’);
11 var headEl = document.getElementById(‘Header’);
12 …
13 }

14 </head>
15 <body onload=”GetMap();”>
16 <div id=’Header’ style=”position: relative; left: 5px; top:
5px; width:400px; height:100px; border: 2px solid black;”> 17 Header
18 </div>
19 <div id=’Map’></div>
20 </body>

You need to position the map so that the header is overlaid on the map and centered at the top.

Which code segment should you insert at line 12?

Which two actions should you perform?

You create Microsoft Windows-based applications. You create an application that loads bulk weather data into a data warehouse for analysis. The application is used by data-entry technicians. One data-entry technician is visually impaired. The data-entry technicians provide a large flat file as the source of the data, and they typically minimize the application so that they can use other programs while the data is being loaded. The data entry technicians must load as many data files as possible during the course of their work day. The user interface contains a progress bar control that has a text label. The text label indicates the current percentage of progress. You need to provide appropriate status feedback to the user by indicating that the process is complete. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

What should you recommend?

You create Web-based client applications. You are creating a Web site that displays product information for your company.

The application must meet the following requirements:

Support at least 20 concurrent users.
Consume less than 40 percent of the CPU time during peak usage. Process at least five requests per second during peak usage, which is estimated to be between 20 and 30 users.

A Web test is created to verify the requirements by recording how a regular user would interact with the site. Then, based on the Web test, a load test is created. The load test simulates 30 users who execute the Web test simultaneously. You need to decide whether the current strategy is enough to verify the requirements, and recommend changes. What should you recommend?

Which code segment should you use?

You are creating a browser-based Web application by using Virtual Earth 6.0 map control. A Web page of the application has a map and a list of locations.

When a user selects a location from the list, the application must meet the following requirements:

A default view of the selected location is loaded.
The selected location is centered.
The selected location appears in the three-dimensional mode, at an oblique pitch, and heads due north.

You need to program Virtual Earth map control to ensure that the requirements are met.

Which code segment should you use?

Which two actions should you perform?

You are creating a Microsoft Windows SharePoint Services site. Windows SharePoint Services is located on the hard disk in the default IIS Web root folder.

A custom ASPX page is displayed on a SharePoint site. A user control named userinfo.ascx is also available.

You need to deploy the user control. You also need to display the control on the ASPX page.

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