PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which code segment should you insert at line GC04?

###BeginCaseStudy###
Case Study: 1
Southbridge Videos
Background
Southbridge Video rents and sells video games, movies, and other multimedia content. The
company is currently expanding its operations. Southbridge video is developing a Windows
Store news reader and social media app. Users will be able to view and interact with news
stories that are related to the video game, entertainment, and related industries. Southbridge
Video employees will also use the app to manage sales leads, order fulfillment, and customerservice related activities.
Business Requirements
The app has the following requirements.
Email
Users must be able to email news items to their contacts.
Navigation
• Easy navigation access must be available to move to the next and previous pages.
• Users searching for specific news items must be able to navigate directly to an item
from the search results pane.
News items
• When a user selects a news item on newsPage.html, the news item should be
displayed in the newsltem.html page.
• The app must periodically retrieve new news items on the newsPage.html page.
• The app must allow the user to save annotated news.
• The app must display a short title for each news item.
Search capabilities
• The app must allow users to search within available news items to locate articles of
interest.
• The app must provide search suggestions for users.
Authentication
• Employees must be able to view the sales leads, order fulfillment, and customerservice related pages.
• Authenticated users must be able to save news items to read at a later time.
• Authenticated users must be able to add and save handwritten notes to the news items.
• The app must allow users to choose whether their credentials will be saved after they first log in. User credentials must be saved by default.
Technical Requirements
Email
• When a user clicks the To button to email news items, only contacts that have email
addresses should be displayed.
• When multiple contacts are selected, the email addresses must be displayed in the To
text box as a semi-colon-delimited string.
News items
The app must periodically retrieve new items from a web service. The app must display a
progress indicator while retrieving new items.
The news feed service must respond to all requests within 15 seconds. The app must not
throw an error if the service does not respond within the allotted time.
Titles for news items must not overflow into other elements on the page.
Authenticated users must be able to add handwritten notes to the news items by using a stylus
or the mouse. The app must support saving annotations along with the news item. The app
must cancel the navigation from newsltem.html to newsPage.html if there are unsaved
changes in the annotations area.
Search capabilities
The app must retrieve a list of phrases from the news service and provide them as search
suggestions to users.
Authentication
• Users connected to the corporate network must authenticate against an Active
Directory server.
• Users outside of the corporate network must authenticate by using forms-based
authentication.
• User credentials must not be transmitted in plain text.
Application Structure
Relevant portions of the app files are shown below. (Line numbers in the code segments are
included for reference only and include a two-character prefix that denotes the specific file to
which they belong.)




###EndCaseStudy###

You need to configure the CredentialPicker object to meet the requirements.
Which code segment should you insert at line GC04?

Which line of code should you use?

You are developing a web page that consumes a Windows Communication Foundation (WCF)
service. The page includes the following code segment.
var xhr = new XMLHttpRequest() ;
The page uses the xhrHandler() method to listen for changes to the request status of the WCF
service calls. It uses the xmlToJavaScript() method to convert the response from the WCF service to a
JavaScript object.
The xhrHandler() method must be called automatically each time the request status changes.
You need to add the event handler to the request object.

Which line of code should you use?

Which code segment should you insert at line NP11?

###BeginCaseStudy###
Case Study: 1
Southbridge Videos
Background
Southbridge Video rents and sells video games, movies, and other multimedia content. The
company is currently expanding its operations. Southbridge video is developing a Windows
Store news reader and social media app. Users will be able to view and interact with news
stories that are related to the video game, entertainment, and related industries. Southbridge
Video employees will also use the app to manage sales leads, order fulfillment, and customerservice related activities.
Business Requirements
The app has the following requirements.
Email
Users must be able to email news items to their contacts.
Navigation
• Easy navigation access must be available to move to the next and previous pages.
• Users searching for specific news items must be able to navigate directly to an item
from the search results pane.
News items
• When a user selects a news item on newsPage.html, the news item should be
displayed in the newsltem.html page.
• The app must periodically retrieve new news items on the newsPage.html page.
• The app must allow the user to save annotated news.
• The app must display a short title for each news item.
Search capabilities
• The app must allow users to search within available news items to locate articles of
interest.
• The app must provide search suggestions for users.
Authentication
• Employees must be able to view the sales leads, order fulfillment, and customerservice related pages.
• Authenticated users must be able to save news items to read at a later time.
• Authenticated users must be able to add and save handwritten notes to the news items.
• The app must allow users to choose whether their credentials will be saved after they first log in. User credentials must be saved by default.
Technical Requirements
Email
• When a user clicks the To button to email news items, only contacts that have email
addresses should be displayed.
• When multiple contacts are selected, the email addresses must be displayed in the To
text box as a semi-colon-delimited string.
News items
The app must periodically retrieve new items from a web service. The app must display a
progress indicator while retrieving new items.
The news feed service must respond to all requests within 15 seconds. The app must not
throw an error if the service does not respond within the allotted time.
Titles for news items must not overflow into other elements on the page.
Authenticated users must be able to add handwritten notes to the news items by using a stylus
or the mouse. The app must support saving annotations along with the news item. The app
must cancel the navigation from newsltem.html to newsPage.html if there are unsaved
changes in the annotations area.
Search capabilities
The app must retrieve a list of phrases from the news service and provide them as search
suggestions to users.
Authentication
• Users connected to the corporate network must authenticate against an Active
Directory server.
• Users outside of the corporate network must authenticate by using forms-based
authentication.
• User credentials must not be transmitted in plain text.
Application Structure
Relevant portions of the app files are shown below. (Line numbers in the code segments are
included for reference only and include a two-character prefix that denotes the specific file to
which they belong.)




###EndCaseStudy###

You need to implement the code to meet the search requirements.
Which code segment should you insert at line NP11?

You need to develop the application to meet the requirements

DRAG DROP
You are developing a web application that retrieves data from a web service. The data being
retrieved is a custom binary datatype named bint. The data can also be represented in XML.
Two existing methods named parseXml() and parseBint() are defined on the page.
The application must:
Retrieve and parse data from the web service by using binary format if possible
Retrieve and parse the data from the web service by using XML when binary format is not possible
You need to develop the application to meet the requirements.
What should you do? (To answer, drag the appropriate code segment to the correct location. Each
code segment may be used once, more than once, or not at all. You may need to drag the split bar
between panes or scroll to view content.)

Which code segment should you add to newsPage.js?

###BeginCaseStudy###
Case Study: 1
Southbridge Videos
Background
Southbridge Video rents and sells video games, movies, and other multimedia content. The
company is currently expanding its operations. Southbridge video is developing a Windows
Store news reader and social media app. Users will be able to view and interact with news
stories that are related to the video game, entertainment, and related industries. Southbridge
Video employees will also use the app to manage sales leads, order fulfillment, and customerservice related activities.
Business Requirements
The app has the following requirements.
Email
Users must be able to email news items to their contacts.
Navigation
• Easy navigation access must be available to move to the next and previous pages.
• Users searching for specific news items must be able to navigate directly to an item
from the search results pane.
News items
• When a user selects a news item on newsPage.html, the news item should be
displayed in the newsltem.html page.
• The app must periodically retrieve new news items on the newsPage.html page.
• The app must allow the user to save annotated news.
• The app must display a short title for each news item.
Search capabilities
• The app must allow users to search within available news items to locate articles of
interest.
• The app must provide search suggestions for users.
Authentication
• Employees must be able to view the sales leads, order fulfillment, and customerservice related pages.
• Authenticated users must be able to save news items to read at a later time.
• Authenticated users must be able to add and save handwritten notes to the news items.
• The app must allow users to choose whether their credentials will be saved after they first log in. User credentials must be saved by default.
Technical Requirements
Email
• When a user clicks the To button to email news items, only contacts that have email
addresses should be displayed.
• When multiple contacts are selected, the email addresses must be displayed in the To
text box as a semi-colon-delimited string.
News items
The app must periodically retrieve new items from a web service. The app must display a
progress indicator while retrieving new items.
The news feed service must respond to all requests within 15 seconds. The app must not
throw an error if the service does not respond within the allotted time.
Titles for news items must not overflow into other elements on the page.
Authenticated users must be able to add handwritten notes to the news items by using a stylus
or the mouse. The app must support saving annotations along with the news item. The app
must cancel the navigation from newsltem.html to newsPage.html if there are unsaved
changes in the annotations area.
Search capabilities
The app must retrieve a list of phrases from the news service and provide them as search
suggestions to users.
Authentication
• Users connected to the corporate network must authenticate against an Active
Directory server.
• Users outside of the corporate network must authenticate by using forms-based
authentication.
• User credentials must not be transmitted in plain text.
Application Structure
Relevant portions of the app files are shown below. (Line numbers in the code segments are
included for reference only and include a two-character prefix that denotes the specific file to
which they belong.)




###EndCaseStudy###

You need to implement the code to retrieve news items according to the requirements.
Which code segment should you add to newsPage.js?

Which code segment should you use?

You are developing an application that consumes an external web service that returns the latest
stock rate.
The application has two methods:
+The getResults() method makes an AJAX web service request
+The ShowRate() method displays the stock rate from the web service response
You need to ensure that the ShowRate() method always displays the latest stock rate.
Which code segment should you use?

Which code segment should you insert at line EJ03?

###BeginCaseStudy###
Case Study: 1
Southbridge Videos
Background
Southbridge Video rents and sells video games, movies, and other multimedia content. The
company is currently expanding its operations. Southbridge video is developing a Windows
Store news reader and social media app. Users will be able to view and interact with news
stories that are related to the video game, entertainment, and related industries. Southbridge
Video employees will also use the app to manage sales leads, order fulfillment, and customerservice related activities.
Business Requirements
The app has the following requirements.
Email
Users must be able to email news items to their contacts.
Navigation
• Easy navigation access must be available to move to the next and previous pages.
• Users searching for specific news items must be able to navigate directly to an item
from the search results pane.
News items
• When a user selects a news item on newsPage.html, the news item should be
displayed in the newsltem.html page.
• The app must periodically retrieve new news items on the newsPage.html page.
• The app must allow the user to save annotated news.
• The app must display a short title for each news item.
Search capabilities
• The app must allow users to search within available news items to locate articles of
interest.
• The app must provide search suggestions for users.
Authentication
• Employees must be able to view the sales leads, order fulfillment, and customerservice related pages.
• Authenticated users must be able to save news items to read at a later time.
• Authenticated users must be able to add and save handwritten notes to the news items.
• The app must allow users to choose whether their credentials will be saved after they first log in. User credentials must be saved by default.
Technical Requirements
Email
• When a user clicks the To button to email news items, only contacts that have email
addresses should be displayed.
• When multiple contacts are selected, the email addresses must be displayed in the To
text box as a semi-colon-delimited string.
News items
The app must periodically retrieve new items from a web service. The app must display a
progress indicator while retrieving new items.
The news feed service must respond to all requests within 15 seconds. The app must not
throw an error if the service does not respond within the allotted time.
Titles for news items must not overflow into other elements on the page.
Authenticated users must be able to add handwritten notes to the news items by using a stylus
or the mouse. The app must support saving annotations along with the news item. The app
must cancel the navigation from newsltem.html to newsPage.html if there are unsaved
changes in the annotations area.
Search capabilities
The app must retrieve a list of phrases from the news service and provide them as search
suggestions to users.
Authentication
• Users connected to the corporate network must authenticate against an Active
Directory server.
• Users outside of the corporate network must authenticate by using forms-based
authentication.
• User credentials must not be transmitted in plain text.
Application Structure
Relevant portions of the app files are shown below. (Line numbers in the code segments are
included for reference only and include a two-character prefix that denotes the specific file to
which they belong.)




###EndCaseStudy###

You need to ensure that the app displays only contacts that meet the requirements.
Which code segment should you insert at line EJ03?

How should you write the code?

HOTSPOT
You are developing an online shopping application that accepts credit cards for payment.
If the credit card number is invalid, the application must:
Generate an error
Assign “200” to the error number
Assign “Invalid” to the error description
You need to write the code that meets the requirements.
How should you write the code? (To answer, select the appropriate option from the drop-down list in the answer area.)

Which three statements should you implement in sequence?

DRAG DROP
You are developing an application that reads information from a file.
The application must:
+Execute a block of code if there is an error accessing the file
+Execute a second block of code whether or not there is an error accessing the file
You need to ensure that the error handling requirements are met.
Which three statements should you implement in sequence? (To answer, move the appropriate
statements from the list of actions to the answer area and arrange them in the correct order.)