Question 6 of 260
HOTSPOT -
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 using binary format if possible
✑ Retrieve and parse the data from the web service using XML when binary format is not possible
You need to develop the application to meet the requirements.
What should you do? (To answer, select the appropriate options from the drop-down lists in the answer area.)
Hot Area:
Exam 70-480: Question 6 - Image 1
    Correct Answer:
    * accepts : 'application/bint, text/xml'
    accepts:'application/bin,text/xml' to accept only XML and binary content in HTML responses.
    * Use the following condition to check if the html response content is binary: If(request.getResponseHeader("Content-Type")=="application/bint"
    * var request = $.ajax({
    uri:'/',
    accepts: 'application/bint, text/xml',
    datafilter: function(data,type){
    if(request.getResponseHeader("Content-Type")=="application/bint") return parseBint(data); else return parseXml();
    },
    success: function (data) {
    start(data);
    }
    }); Exam 70-480: Question 6 - Image 2
Question 7 of 260
You are developing a customer web form that includes the following HTML.
<input id = "txtValue" />
A customer must enter a value in the text box prior to submitting the form.
You need to add validation to the text box control.
Which HTML should you use?
    Correct Answer: A

    To ensure that a customer must enter a value in the text box before submitting the form, you should use the 'required' attribute within the input tag. The correct HTML should be . This attribute is a boolean attribute that specifies that the input field must be filled out before the form can be submitted.

Question 8 of 260
DRAG DROP -
You are developing a web page for runners who register for a race. The page includes a slider control that allows users to enter their age.
You have the following requirements:
✑ All runners must enter their age.
✑ Applications must not be accepted from runners less than 18 years of age or greater than 90 years.
✑ The slider control must be set to the average age (37) of all registered runners when the page is first displayed.
You need to ensure that the slider control meets the requirements.
What should you do? (To answer, drag the appropriate word or number to the correct location in the answer area. Each word or number 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.)
Select and Place:
Exam 70-480: Question 8 - Image 1
    Correct Answer:
    Box 1-3: The <input type="range"> is used for input fields that should contain a value within a range.

    Example -
    <input type="range" name="points" min="0" max="10">
    Box 4-5: Use the value attribute to set the default value

    Box 6: Definition and Usage -
    The required attribute is a boolean attribute.
    When present, it specifies that an input field must be filled out before submitting the form.

    Example -
    Username: <input type="text" name="usrname" required />

    Reference: HTML Input Types -
    http://www.w3schools.com/html/html_form_input_types.asp Exam 70-480: Question 8 - Image 2
Question 9 of 260
You are developing an HTML5 web application that displays the current temperature whenever a button is clicked. The following code provides this functionality.
Exam 70-480: Question 9 - Image 1
When the temperature is loaded, the status property on the loader instance does not change.
You need to ensure that the status property on the loader instance is updated when the temperature is loaded.
Which code segment should you use to replace the Loader function?
Exam 70-480: Question 9 - Image 2
    Correct Answer: A

    The issue with the original code is that it does not update the `status` property of the `loader` instance because it is using a local variable `status` instead of the instance property `this.status`. To fix this, the code must update `this.status` to ensure that it changes the instance property when `updateStatus` is called. Therefore, the replacement code should use `this.status` to correctly update the instance property, which is implemented in Option A. This ensures that when `newStatus` is assigned, it modifies the `status` property of the `loader` instance.

Question 10 of 260
You are creating a class named Consultant that must inherit from the Employee class. The Consultant class must modify the inherited PayEmployee method. The
Employee class is defined as follows.
function Employee() {}
Employee.prototype.PayEmployee = function ( ){
alert('Hi there!');
}
Future instances of Consultant must be created with the overridden method.
You need to write the code to implement the Consultant class.
Which code segments should you use? (Each correct answer presents part of the solution. Choose two.)
    Correct Answer: B, C

    To create the Consultant class that inherits from the Employee class and overrides the PayEmployee method, you should ensure that Consultant.prototype.PayEmployee properly overrides the inherited method. First, you need to set up inheritance by creating the Consultant constructor function that calls the Employee constructor. Then, you assign a new instance of Employee to Consultant's prototype and set the constructor property. This allows instances of Consultant to use the overridden method. The code segment B effectively overrides the inherited PayEmployee method with Consultant.prototype.PayEmployee, and the code segment C properly sets up the inheritance and constructor.