Ensurepass

QUESTION 111

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 ( ){

alertt’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.)

 

  1. Consultant.PayEmployee = function ()

{

alert(‘Pay Consulant’);

}

 

  1. Consultant.prototype.PayEmployee = function ()

{

alert(‘Pay Consultant’);

}

 

  1. function Consultant ()

{

Employee.call(this);

}

Consultant.prototype = new Employee();

Consultant.prototype.constructor = Consultant;

 

  1. function Consultant() {

Employee.call(this); }

Consultant.prototype.constructor = Consultant.create;

 

Correct Answer: BC

 

 

QUESTION 112

You are modifying an existing web page. The page is being optimized for accessibility. The current page contains the following HTML.

 

70-480-demo-250

 

Standards-compliant screen readers must be able to identify the links contained within the navigation structure automatically. You need to create the navigation link structure in the page. With which container tags should you wrap the existing markup?

 

  1. <navmap> </navmap>

  2. <div id=”nav”> </div>

  3. <nav> </nav>

  4. <map> </map>

 

Correct Answer: C

 

 

QUESTION 113

HOTSPOT

You are developing an airline reservation website by using HTML5 and JavaScript. A page on the site allows users to enter departure and destination airport information and search for tickets.

 

You have the following requirements:

 

  • Users must be able to save information in the application about their favorite destination airport.

  • The airport information must be displayed in the destination text box whenever the user returns to the page.

 

You need to develop the site to meet the requirements. Which lines of code should you use?

 

To answer, select the appropriate options from the drop-down lists in the answer area.

 

70-480-demo-251

 

Hot Area:

70-480-demo-252

 

Correct Answer:

70-480-demo-253

 

 

 

QUESTION 114

HOTSPOT

You are developing an HTML5 web application for displaying encyclopedia entries. Each encyclopedia entry has an associated image that is referred to in the entry. You need to display the image by using the correct semantic markup. What should you do?

 

To answer, select the appropriate options from the drop-down list in the answer area.

 

70-480-demo-254

 

Hot Area:

70-480-demo-255

 

Correct Answer:

70-480-demo-256

 

 

 

 

 

 

QUESTION 115

You are creating a JavaScript object that represents a customer. You need to extend the Customer object by adding the GetCommission() method. You need to ensure that all future instances of the Customer object implement the GetCommission() method. Which code segment should you use?

 

  1.  

70-480-demo-257

 

  1.  

70-480-demo-258

 

  1.  

70-480-demo-259

 

  1.  

70-480-demo-260

 

Correct Answer: D

 

 

 

QUESTION 116

You are developing a web form that includes the following code.

 

70-480-demo-261

 

When a user selects the check box, an input text box must be added to the page dynamically. You need to ensure that the text box is added. Which function should you use?

 

  1.  

70-480-demo-262

 

  1.  

70-480-demo-263

 

  1.  

70-480-demo-264

 

  1.  

70-480-demo-265

 

Correct Answer: B

 

QUESTION 117

HOTSPOT

An HTML page has a canvas element. You need to draw a red rectangle on the canvas element dynamically. The rectangle should resemble the following graphic.

 

70-480-demo-266

 

How should you build the code segment?

 

To answer, select the appropriate options from the drop-down lists in the answer area.

 

70-480-demo-267

 

Hot Area:

70-480-demo-268

 

Correct Answer:

70-480-demo-269

 

 

QUESTION 118

You are developing an HTML5 page that has an element with an ID of logo. The page includes the following HTML.

 

<div>

Logo:

<br> <div id=”logo”>

</div>

</div>

 

You need to move the logo element lower on the page by five pixels. Which lines of code should you use? (Each correct answer presents part of the solution. Choose two.)

 

  1. document.getElementById(“logo”) .style.position = “relative”;

  2. document.getElementByld(“logo”).Style.top = “5px”;

  3. document.getElementById(“logo”).style.top = “-5px”;

  4. document.getElementById(“logo”).style.position = “absolute”;

 

Correct Answer: AB

 

 

QUESTION 119

You are developing a web page by using HTML5 and C5S3. The page includes a <div> tag with the ID set to validate. When the page is rendered, the contents of the <div> tag appear on a line separate from the content above and below it. The rendered page resembles the following graphic.

 

70-480-demo-270

 

The page must be rendered so that the <div> tag is not forced to be separate from the other content. The following graphic shows the correctly rendered output.

 

70-480-demo-271

 

You need to ensure that the page is rendered to meet the requirement. Which line of code should you use?

 

  1. document.getElementById(“validate”).style.display = “inline”;

  2. document.getElementById(“validate”).style.margin = “0”;

  3. document.getElementById(“validate”).style.padding = “0”;

  4. document.getElementSyId(“validate”).style.display = “block”;

 

Correct Answer: A

 

QUESTION 120

HOTSPOT

You are creating a web worker for an HTML5 application. The following tasks must be performed from within the web worker:

 

  • Register an event listener for the web worker

  • Start and stop the web worker

 

You need to define a function that performs the required tasks. Which code segment should you use?

 

To answer, select the appropriate option from the drop-down list in the answer area.

 

70-480-demo-272

 

Hot Area:

70-480-demo-273

 

Correct Answer:

70-480-demo-274

 

 

 

Instant Access to Download Latest Complete Collection of Microsoft MCSD 70-480 Real Exam

Try Microsoft MCSD 70-480 Free Demo

Comments are closed.