Q1. 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.)
A. Consultant.PayEmployee = function ()
{
alert('Pay Consulant');
}
B. Consultant.prototype.PayEmployee = function ()
{
alert('Pay Consultant');
}
C. function Consultant () {
Employee.call(this);
}
Consultant.prototype = new Employee();
Consultant.prototype.constructor = Consultant;
D. function Consultant() {
Employee.call(this); }
Consultant.prototype.constructor = Consultant.create;
Answer: BC
Q2. You are creating a JavaScript object that represents an employee.
You need to extend the Employee object by adding the GetPayroll() method.
You need to ensure that all future instances of the Employee object implement the GetPayroll() method.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
Q3. You are developing a web form that includes the following code.
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?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Q4. You develop an HTML5 webpage with custom CSS. You have the following HTML markup:
<div class="new" Item">...</div>
You have the following requirements:
. In addition to your CSS, you must use a corporate branded stylesheet named corporate.ess.
. The corporate.ess file contains the style rule that must be used for .newsItem.
. You must use the corporate.ess file to ensure that the webpage changes when the brand changes.
. You must add additional style rules to the webpage.
. You cannot modify the corporate.ess file.
You need to apply the appropriate CSS rules to meet the requirements.
What should you do?
A. Add a CSS class named .newsItemUpdates to the webpage, add only the new styles to this class, and update the class attribute of the HTML markup:
<div class=nnewsltem newsItemUpdates">..,</div>
B. Update the corporate.ess file to include! important for each rule for the .newsItem. class, and add the new CSS rules to the webpage by using the CSS class .newsItem.
C. Add a CSS class named .newsitemUpdates to the webpage, add the new styles to this class, and update the HTML markup to replace the .newsItem class with this new class:
<div class*"newsItemOpdates">...</div>
D. Add the new CSS rules to the webpage by using the CSS class .newsItem, and add! important to each rule.
Answer: D
Q5. You are developing a customer web form that includes following HTML.
<input id= "textAccountType"/>
You need to develop the form so that customers can enter only a valid account type consisting of two English alphabet characters.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Q6. You are developing an HTML5 page.
You need to add author and copyright information.
Which tag should you use?
A. <aside>
B. <header>
C. <footer>
D. <section>
Answer: C
Q7. You are developing an HTML5 web page.
The appearance of the text box must change when a user moves the focus to another element on the page.
You need to develop the page to respond to user action.
Which line of code should you use?
A. <input type="text" onblur="resetStyle(this);" />
B. <input type="text" onfocus="resetStyle(this);" />
C. <input type="text" onreset="resetStyle(this);" />
D. <input type="text" onselect="resetStyle(this);" />
Answer: A
Q8. You are developing an HTML5 web application that displays stock information.
The application loads information from a web service by using AJAX.
The following code defines a Stock object and loads stock data.
You need to implement the loadStock function. Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Q9. You are developing an HTML5 web application for a surveyor company that displays topographic images.
The application must:
Display the topographic images at different zoom levels without loss of detail Print the topographic images without loss of detail Work from only one source file for each topographic image
You need to ensure that the topographic images display according to the requirements.
Which HTML5 element should you use?
A. SVG
B. CANVAS
C. SAMP
D. AREA
Answer: A
Q10. You are developing a blog web page that is being optimized for accessibility. The page includes the following HTML.
The heading tags represent a blog post title, a blog post subtitle, and the author's name.
You need to ensure that the three headings are treated as a unit but retain their individual formatting.
Which tags should you use to wrap the H1, H2, and H3 elements?
A. <group> </group>
B. <header> </header>
C. <hgroup> </hgroup>
D. <headings> </headings>
Answer: C
Q11. You develop an HTML5 webpage. You have the following HTML markup:
You need to add a background color to the first article in each section.
Which code segment should you add to the webpage?
A. $ ("section article:first-child").css("background-color", "#f2f2f2");
B. $ ("section:first-child").ess ( "background-color", "#f2f2f2");
C. $ ("article:first-of-type") .css("background-color", "#f2f2f2");
D. $ ("section:first-of-type").css("background-color", "#f2f2f2");
Answer: C
Q12. You are developing a web page that includes the following HTML.
<span id = "myTextSpan" class = "redText"> Hello There! </span>
The font color of text inside the span must be red.
You need to develop the web page to meet the requirement.
Which two CSS segments will achieve the goal? (Each correct answer presents a complete solution. Choose two.)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: AC
Q13. You are developing a web page that has a group of HI and H2 elements. The page also includes a CSS class named underlineMe.
You have the following requirements:
The font color of all H1 and H2 elements must be changed to red.
The CSS class underlineMe must be applied to all H1 and H2 elements.
You need to update the web page to meet the requirements. Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
Q14. You implement an application by using HTML5 and JavaScript. You create a webpage that contains the following HTML:
The application must place a border on only the first UL element that is contained in the DIV element.
You need to update the webpage.
What should you do?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
Q15. You are developing an HTML page that includes the following code.
<h1 id="header">A Static Page</hl>
You need to modify the content of the HI element dynamically by using JavaScript.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D