Microsoft 70-547 Real Exam Questions

PRO: Designing and Developing Web-Based Applications by Using the Microsoft .NET Framework

When the exam begins, you can choose the programming language in which the code segments will appear. The available code languages for this exam are:

  • Microsoft Visual Basic 2005

  • Microsoft Visual C# 2005

1: You create Web-based client applications. You are creating a sales management application. The application will be used to produce sales orders. Sales data, including orders and product information, is stored in a central Microsoft SQL Server 2005 database. The application uses Microsoft Windows Integrated security to access data. You test the application component that is used to retrieve sales order information from the database. The tests are successful. You check the code back into the source control so that the other testers can utilize the code. The testers notify you that the application fails to connect to the database in the test environment. You test the application again and the tests are successful. You need to recreate the bug environment to investigate and resolve the bug. Which three aspects of the testing environment should you take into account? (Each correct answer presents part of the solution. Choose three.)
A.Web server processor speed
B.Database security settings
C.Network bandwidth
D.Web server available memory
E.Network credentials used for testing
F.Impersonation settings
Correct Answers: B E F

2: You create Web-based applications. You are creating an application that manages travel arrangements. Users can book business trips through the application and submit their expense reports. The current design specifies that 10 components are consumed by the application. You need to identify the components that require integration testing. Which three components should you choose? (Each correct answer presents part of the solution. Choose three.)
A.public Web service to retrieve weather information
B.third-party Web service to book flights
C.third-party Web service to book car rentals
D.locally hosted COM+ component to book hotels
E.locally hosted data access component to access a central database
F.the .NET Framework Web server controls
Correct Answers: A B C

3: 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?
A.Add the following code segment to the Web.config file.
<system.web>
     <compilation debug="true"/>
</system.web>
B.Add the following code segment to the page.
protected void Page_Error(object sender, EventArgs e) {
  Response.Redirect("error.aspx");
}
C.Add the following code segment to the Web.config file.
<system.web>
     <customErrors mode="Off"/>
</system.web>
D.Change the load event handler to the following code segment.
protected void Page_Load(object sender, EventArgs e) {
  try {
    LoadEmployees();
  }
  Catch {
    Response.Redirect("error.aspx");
  }
}
Correct Answers: B

4: 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?
A.The current strategy is enough to test the requirements.
B.Create a unit test for the processor intensive methods.
C.Create a second load test for 20 simultaneous users.
D.Delete the load test and use the Web test with system monitor.
Correct Answers: A

5: 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?
A.Assert.AreEqual (400M, target.Balance);
B.Assert.IsTrue (target.Balance != 400M);
C.Debug.Assert (target.Balance == 400M,passed);
D.Debug.Assert (target.Balance == 400M,failed);
Correct Answers: A

6: 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?
A.Lines commented A, B, and C
B.Lines commented A and C
C.Lines commented A, B, C, D, E, and F
D.Lines commented A, B, C, E, and F
Correct Answers: B

7: You create Web-based client applications. You are creating an online reporting application that must generate inventory restocking reports within 34 seconds. In the development environment, during a unit test, generation of the month-end report took 42 seconds. You need to recommend what action must be taken to validate the test results. What should you recommend?
A.Update the performance requirements, and do performance testing in the production environment.
B.Deploy a debug build of the code, and do performance testing in the staging environment.
C.Update the code to meet the requirements, and do unit testing in the staging environment.
D.Deploy a release build of the code, and do performance testing in the staging environment.
Correct Answers: D

8: You create Web-based client applications. You create an application that is used as a portal. The portal uses a set of custom controls that expose different functionalities.
The set of custom controls includes one control each for the following three tasks:
Track sales
Track inventory
Permit access to the corporate e-mail of the company
The portal must permit users to select the controls that they need to display on the basis of a predefined list.
The design team proposes the following steps to meet the requirement:
Create the custom controls as Web parts.
Create a Web part zone page that has two Web part controls and a catalog part control.
Add the sales Web part control to the Web part zone.
You need to evaluate whether the solution meets the requirements. What should you conclude?
A.The requirements are met. There is no need to change the application design.
B.The requirements are not met. An editor part zone is necessary.
C.The requirements are not met. The Web part controls must be added to the catalog part.
D.The requirements are not met. The Web part controls must be added to the Web part page.
Correct Answers: C

9: You create Web-based client applications. You create an application that will be used by customers to browse the product catalog of an Internet-based store and buy products.
The application must meet the following requirements:
Permit registered customers of the store to change display settings and personal information.
Store the updated information and associate the information with the logged-on customer.
You need to choose appropriate technologies to meet these requirements. Which two technologies should you choose? (Each correct answer presents part of the solution. Choose two.)
A.SSL
B.Editor parts
C.Catalog parts
D.User profiles
E.Themes
Correct Answers: D E

10: You create Web-based client applications. You are creating a Web control that includes data entry fields. The Web control also includes data validation code. The data validation code verifies whether the user has entered a valid date and a valid postal code in a text box. You are writing the code within the Web control to handle the invalid data. The Web control must work on as many browsers as possible. You need to design an appropriate feedback technique. What should you do?
A.Throw an exception, and include details about the invalid data in the Message property.
B.Throw an exception, and include details about the invalid data in the InnerException property.
C.Use a pop-up error message to inform the user that the data is not valid.
D.Display text to indicate why the data is not valid.
Correct Answers: D

Download  |  Password: certificatexam.com