|
Microsoft 70-547(VB) Exam - GetRealQuestions.com Free 70-547(VB) Sample Questions:
Q: 1 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 Sub Transfer(ByVal amount As Decimal, _
ByVal account As BankAccount)
02 If Not (amount > 0) Then
03 Throw New Exception("Invalid deposit amount!")
04 Else
05 Me.Withdraw(amount)
06 account.Deposit(amount)
07 End If
08 End Sub
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 Sub TransferTest()
03 Dim target As BankAccount = New BankAccount()
04 Dim transferTo As BankAccount = New BankAccount()
05 target.Deposit(500)
06 target.Transfer(100, transferTo)
07 Assert.Inconclusive( _
"A method that does not return a value cannot be verified.")
08 End Sub
You need to change the test method to return a conclusive result. Which line of code should replace the
code on line 07 of the unit test?
A. Assert.AreEqual(400D, target.Balance)
B. Assert.IsTrue(target.Balance <> 400D)
C. Debug.Assert(target.Balance = 400D, "passed")
D. Debug.Assert(target.Balance = 400D, "failed")
Answer: A
Q: 2 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.
Answer: A
Q: 3 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.
Answer: D
Q: 4 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 Shared Function Payment(ByVal loanAmount As Decimal, _
ByVal period As Integer, ByVal rate As Decimal) As Decimal
If Not (loanAmount > 0) OrElse _
Not (period > 1) OrElse _
Not (rate > 0) Then ' Line A
Throw New Exception("Invalid input!") ' Line B
Else
'code to calculate payment
Return 877.57D ' Line C: return a calculated payment
End If
End Function
Public Shared Function CheckBalance(ByVal account As ULong) _
As Decimal
Return 877.57D ' Line D: return calculated balance
End Function
You write the following code for the unit test.
<TestMethod()> _
Public Sub PaymentTest()
Dim payment As Decimal = _
Loan.Payment(100000, 360, 10) ' Line E
Assert.AreEqual(_payment, 877.57D) ' Line F
End Sub
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
Answer: B
Q: 5 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 Sub Page_Error(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Me.Error
Response.Redirect("error.aspx")
End Sub
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 Sub Page_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Me.Load
Try
LoadEmployees()
Catch
Response.Redirect("error.aspx")
End Try
End Sub
Answer: B
Q: 6 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
Answer: B, E, F
Q: 7 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
Answer: A, B, C
Q: 8 You create Web-based client applications.
You are designing a database that must meet the following requirements:
Store data about people in the People table and data about the companies they work for in the
Companies table.
Track an unlimited number of companies for a person.
Track an unlimited number of persons who worked at each company.
You decide to create a one-to-many link from the People table to the Companies table. You need to
evaluate whether the database is designed effectively and make a recommendation, if required. What
should you recommend?
A. The database is not correctly designed according to the requirements. You must create a many-to-many link
between the People table and the Companies table by using an intersection table.
B. The database is not correctly designed according to the requirements. You must create a many-to-many link
directly between the People table and the Companies table.
C. The database is not correctly designed according to the requirements. You must create a one-to-many link
from the People table to the Companies table. Create another one-to-many link from the Companies table to the
People table. Add columns to the People table and the Companies table to accommodate multiple child rows.
D. The database is correctly designed according to the requirements. No changes are required.
Answer: A
Q: 9 You create Web-based client applications. All Web-based applications are
created by using ASP.NET. Larger applications are hosted on Web server farms. The larger applications
appear to intermittently lose session state information for users. You need to correct the problem. What
should you do?
A. Add additional servers to the Web farm to accommodate load. Configure the entire Web farm to reside in
the same domain. Configure IIS on each server to have domain-level administrative permissions.
B. Modify the Web.config file and set the mode attribute of the sessionState element to InProc. Restart IIS on
each associated Web server.
C. Modify the Web.config file and set the mode attribute of the sessionState element to StateServer. Start the
state service on each associated Web server.
D. Modify the Web.config file and set the mode attribute of the sessionState element to None. Configure IIS
on each Web server to make state information available to all servers in the Web farm.
Answer: C
Q: 10 You create Web-based client applications. You are evaluating the design of
an e-commerce Web site. The Web site processes credit card information. The Web site has a shopping
cart and expects a high volume of traffic, especially during peak shopping times.
The design specifications for the application must meet the following criteria:
The application will be hosted on a Web farm.
The application will use SSL during the checkout process.
Shopping cart information will be stored in InProc session variables.
You need to evaluate the design of the application and recommend whether it is technically feasible and
complete. What should you conclude?
A. The design is technically feasible, but it is not complete. The application must be configured to use
cookieless sessions. Each server on the farm must use a unique certificate.
B. The design is technically feasible and complete.
C. The design is technically feasible, but it is not complete. The servers must have their affinity set to a single
host (sticky sessions).
D. The design is not technically feasible. The application cannot be hosted on a Web farm.
Answer: C
Q: 11 You create Web-based applications. You are creating an Internet banking
application. The application will be used by bank account holders.
You are creating a method to withdraw money from an account. The method must change the account
balance according to one of the following rules:
If the amount that is being withdrawn is less than or equal to the account balance, then subtract the
amount from the balance.
If the amount that is being withdrawn is greater than the account balance by up to 500 dollars, then
subtract the amount and a 35-dollar fee from the balance.
If the amount that is being withdrawn is greater than the account balance by more than 500 dollars, then
generate an error.
You are translating the specification given here into pseudo code. You start by writing the following code.
Method
Public Sub Withdraw
Input parameters
Decimal amount
Class field
Decimal balance
Pseudo code
//your pseudo code
You need to insert the correct pseudo code. Which code segment should you insert?
A. If amount < balance then balance - = amount
If amount < balance + 500 then balance = balance - (amount + 35)
If amount > balance + 500 then throw exception
B. If amount <= balance then balance - = amount
If amount <= balance + 500 then balance = balance - (amount + 35)
If amount > balance + 500 then throw exception
C. If amount < balance then balance - = amount
Else If amount < balance + 500 then balance = balance - (amount + 35)
Else throw exception
D. If amount <= balance then balance - = amount
Else If amount <= balance + 500 then balance = balance - (amount + 35)
Else throw exception
Answer: D
Q: 12 You create Web-based client applications. You are designing an extranet
site for a company of trading partners.
You decide to use the following technologies:
Windows Authentication
XML to transfer data between the company and the traders
Before implementation, these technologies must be validated. You propose the following approach to
perform the validation:
Coordinate a test set of Active Directory accounts for one trading partner.
Provide the trading partner access to a test site that has logon facility.
Distribute the XML schema that permits the partner to access data.
You need to evaluate whether the approach validates the proposed technology successfully. What should
you conclude?
A. The approach validates the use of the proposed technology for the application.
B. The approach does not validate the use of the proposed technology for the application. The company and
the partner need to create test applications. The test applications need to read data in the proposed XML schema
to establish the validation.
C. The approach does not validate the use of the proposed technology for the application. The company and
the partner need to coordinate their Active Directory tree into a shared Active Directory forest.
D. The approach does not validate the use of the proposed technology for the application. You must either use
an existing publicly documented XML schema or register the shared XML schema by using an authentication
site.
Answer: B
Q: 13 You create Web-based client applications. Your client company has an
existing ASP.NET Web-based application. The Web-based application uses a combination of HTML and
client-side scripting to deliver online training content. Your client company has asked you to enhance the
application to deliver interactive multimedia content. The enhanced application must support dial-up
users. You need to recommend an appropriate multimedia delivery mechanism for the application. What
should you recommend?
A. Dynamic HTML
B. Streaming video
C. Vector graphics animation
D. XML/XSLT
Answer: C
Q: 14 You create Web-based client applications. You are creating an ASP.NET
intranet site. The site permits individual departments to post content without involving the Central
Information Technology resources. The site also permits Central Information Technology to maintain
control over the intranet as a whole. Each department wants complete control over the appearance and
behavior of their departmental content. However, Information Technology directives require every page
on the intranet to maintain a consistent appearance and behavior. You need to develop the Web page on
the intranet site so that it meets the requirements. What should you do?
A. Create a single ASP.NET master page and individual department master pages. The pages must refer to the
master page. Permit each department to modify its master page as desired as long as it references the company
master page.
B. Create a set of common .aspx files that contain the common style sheets and the header, navigation bar, and
footer content that are to be referenced from departmental home pages by using ASP.NET #include directives.
C. Create a base class that inherits from System.Web.UI.Page and design this page to control the common user
interface elements.
D. Create the home pages for all departments as ASP.NET server controls. Reference each control from the
main project and load the appropriate server control when a departments home page is loaded.
Answer: A
Q: 15 You create Web-based client applications. You are creating a
user-assistance mechanism for a Web form. The Web form serves as a multilevel wizard for clients to set
up a new inventory for items.
The user-assistance mechanism must meet the following requirements:
Enable entry-level users to understand every step of the multilevel wizard process.
Ensure that users complete the multilevel wizard on their first try.
You need to select the appropriate user-assistance mechanism to meet the outlined requirements. What
should you do?
A. Place a Help link and a hidden label next to each field on each step of the wizard. The label must contain a
brief description of the purpose of the field. Click the Help link to make the label visible.
B. Place a Help link at the bottom of each step of the wizard, which opens a Web-based Help document for the
entire wizard.
C. Place a description of each step of the wizard on the first page of the wizard, before the user has entered any
data.
D. Place text containing user assistance for each step of the wizard at the top of that step.
Answer: D |