Which code segment should you use?
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.)
Select and Place:
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.)
Hot Area:
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 use?
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 use?
Which HTML should you use?
You are developing a customer web form that includes the following HTML.
<input id=”txtValue”/>
You need to change the HTML markup so that customers can enter only a valid three-letter country code.
Which HTML should you use?
Which HTML should you use?
You are developing a customer web form that includes the following HTML input field.
<input id=”txtValue”/>
If a customer enters a value in the input field, then it must be a numeric value.
You need to add validation to the input field.
Which HTML should you use?
Which value should you use?
You are developing an HTML5 page. The page includes the following code.
The inner paragraph must be exactly 15 pixels from the top left corner of the outer paragraph. You set the left
style for the inner paragraph to the appropriate value.
You need to set the position property of the inner paragraph.
Which value should you use?