70-480 MS Certifikat Dump HTML, CSS, JS
70-480 MS Certifikat Dump HTML, CSS, JS
70-480 MS Certifikat Dump HTML, CSS, JS
71YouaredevelopinganHTML5webapplicationandarestylingtext.Youneedtousethetext
transformCSSproperty.Whichvalueisvalidforthetexttransformproperty?
A.
B.
C.
D.
Lowercase
Blink
Linethrough
20px
CorrectAnswer:A
QUESTION2
72DRAGDROPYouaredevelopingawebpageforrunnerswhoregisterforarace.Thepage
includesaslidercontrolthatallowsuserstoentertheirage.Youhavethefollowingrequirements:
Allrunnersmustentertheirage.
Applicationsmustnotbeacceptedfromrunnerslessthan18yearsofageorgreaterthan
90years.
Theslidercontrolmustbesettotheaverageage(37)ofallregisteredrunnerswhenthe
pageisfirstdisplayed.
Youneedtoensurethattheslidercontrolmeetstherequirements.
Whatshouldyoudo?(Toanswer,dragtheappropriatewordornumbertothecorrectlocationin
theanswerarea.
Eachwordornumbermaybeusedonce,morethanonce,ornotatall.Youmayneedtodragthe
splitbarbetweenpanesorscrolltoviewcontent.)
SelectandPlace:
CorrectAnswer:
QUESTION3
73YouarecreatingaJavaScriptobjectthatrepresentsanemployee.Youneedtoextendthe
EmployeeobjectbyaddingtheGetPayroll()method.Youneedto
A.
B.
C.
D.
CorrectAnswer:D
QUESTION4
74YouaredevelopinganHTML5pagethatincludesseveralparagraphelements.Youhavethe
followingrequirements:
Addadropshadowthatisoneinchbelowthetextintheparagraph
Settheradiusofthedropshadowtofivepixels
Youneedtostyletheparagraphstomeettherequirements.WhichCSSstyleshouldyouuse?
A.
B.
C.
D.
Textshadow:72pt0pt5pt
Textshadow:5pxlin0px;
Textshadow:72pt0em5px;
Textshadow:100px0px5px;
CorrectAnswer:B
Explanation/Reference:
Itseemslikenoneoftheaboveiscorrect!Thecorrectanswershouldbe:textshadow:072pt5px;
reference:http://reference.sitepoint.com/css/textshadow
QUESTION5
75YouaredevelopinganHTML5webapplicationandarestylingtext.Youneedtousethetext
transformCSSproperty.Whichvalueisvalidforthetexttransformproperty?
A.
B.
C.
D.
Capitalize
Red
20px
Italic
CorrectAnswer:A
QUESTION6
76Youaremodifyingablogsitetoimprovesearchenginereadability.Youneedtogrouprelevant
pagecontenttogethertomaximizesearchenginereadability.Whichtagshouldyouuse?
A.
B.
C.
D.
<article>
<table>
<div>
<span>
CorrectAnswer:A
QUESTION7
77YouaredevelopinganHTML5pagethathasanelementwithanIDofpicture.Thepage
includesthefollowingHTML.
Youneedtomovethepictureelementloweronthepagebyfivepixels.Whichtwolinesofcode
shouldyouuse?(Eachcorrectanswerpresentspartofthesolution.Choosetwo.)
A.
B.
C.
D.
document.getEIementById(picture).style.position=relative;
document.getElementById(picture).style.top=5px;
document.getEiementById(picture).style.top=5px;
document.getEIementById(picture).style.position=absolute;
CorrectAnswer:AB
QUESTION8
78Youaremodifyingablogsitetoimprovesearchenginereadability.Youneedtogrouprelevant
pagecontenttogethertomaximizesearchenginereadability.Whichtagshouldyouuse?
A.
B.
C.
D.
<section>
<tbody>
<div>
<table>
CorrectAnswer:A
QUESTION9
79YouaredevelopingacustomerwebformthatincludesthefollowingHTML.<input
id=txtValue/>
YouneedtochangetheHTMLmarkupsothatcustomerscanenteronlyavalidthreeletter
countrycode.WhichHTMLshouldyouuse?
A.
B.
C.
D.
<inputid=txtValuetype=country/>
<inputid=txtValuetype=textrequired=xxx/>
<inputid=txtVa!uetype=textpattern[AZaz]{3}/>
<inputid=txtValuentype=codepattern=country/>
CorrectAnswer:C
QUESTION10
80YouaredevelopinganHTML5webapplicationandarestylingtext.Youneedtousethetext
transformCSSproperty.Whichvalueisvalidforthetexttransformproperty?
A.
B.
C.
D.
Capitalize
Hidden
Italic
Linethrough
CorrectAnswer:A
QUESTION11
81YouaredevelopinganHTML5webapplicationandarestylingtext.Youneedtousethetext
transformCSSproperty.Whichvalueisvalidforthetexttransformproperty?
A.
B.
C.
D.
Italic
Linethrough
Capitalize
20px
CorrectAnswer:C
QUESTION12
82Youaremodifyingablogsitetoimprovesearchenginereadability.Youneedtogrouprelevant
pagecontenttogethertomaximizesearchenginereadability.Whichtagshouldyouuse?
A.
B.
C.
D.
<tbody>
<article>
<div>
<span>
CorrectAnswer:B
QUESTION13
83Youaremodifyingablogsitetoimprovesearchenginereadability.Youneedtogrouprelevant
pagecontenttogethertomaximizesearchenginereadability.Whichtagshouldyouuse?
A.
B.
C.
D.
<span>
<nav>
<cable>
<section>
CorrectAnswer:D
QUESTION14
84YouaredevelopinganHTML5webapplicationandarestylingtext.Youneedtousethetext
transformCSSproperty.Whichvalueisvalidforthetexttransformproperty?
A.
B.
C.
D.
red
hidden
lowercase
italic
CorrectAnswer:C
QUESTION16
86DRAGDROPYouarecreatinganapplicationbyusingHTML5andCSS3.Thestylesforthepages
arederivedfromfivestylesheets.
Thestylesarenotbeingappliedcorrectlytothepagesintheapplication.
Youneedtodeterminetheorderinwhichthestylesheetswillbeappliedbythebrowser.
Inwhichorderwillthefivestylesheetsbeapplied?(Toanswer,movethestylesheettypesfrom
thelistofstylesheettypestotheanswerareaandarrangethem
intheorderthattheywillbeapplied.)
SelectandPlace:
CorrectAnswer:
Explanation/Reference:
Theorderofdeclarationsfromleastimportanttomostimportant:
QUESTION18
88YoudevelopanHTML5webpage.YouhavethefollowingHTMLmarkup:(Linenumbersarefor
referenceonly.)
ThewebpagealsocontainsthefollowingCSSmarkup:
YouneedtodeterminehowthewebpagewillappearwhentheCSSstylesareapplied.Selecttwo.
A.
B.
C.
D.
E.
Thefirstrowofthetablewillhavearedbackground.
Thesecondrowofthetablewillhavearedbackground.
Thesecondcellinthefirstrowofthetablewillhaveabluebackground.
Thesecondcellinthethirdrowofthetablewillhaveabluebackground.
Thesecondcellinthethirdrowofthetablewillhavenothavebluebackground.
CorrectAnswer:AE
QUESTION19
89HOTSPOTYouarereviewingtheCSSmarkupforanHTML5pagethatdisplaysanewsarticle.
TheCSSmarkupforthepageisasfollows:
TheHTMLmarkupforthepageisasfollows:
Foreachstatementinthetable,selectYesifthecodesegmentsabovecausesthepagetobehave
asdescribed.SelectNoifitdoesnot.Makeonlyoneselectionineachcolumn.
HotArea:
CorrectAnswer:
QUESTION20
90HOTSPOTYoureviewcodethatusesWebSocketsforabrowserbasedmultiplayergame.Each
playersendsamovetotheserver,whichthensendsthemovetoallconnectedgameinstances.
Thefollowingcoderunsinthebrowserandhandlesthesendingandreceivingofmoves:
Foreachstatementinthetable,selectYesifthecodesegmentabovecausesthepagetobehave
asdescribed.SelectNoifitdoesnot.Makeonlyoneselectionineachcolumn.
HotArea:
CorrectAnswer:
QUESTION21
91Youdevelopawebpage.Thewebpagemustdisplayagridthatcontainsonerowandfive
columns.Columnsone,three,andfivearethesamewidth.Columnstwoandfourarethesame
width,butmuchwiderthancolumnsone,three,andfive.Thegridresemblesthefollowingimage:
Thegridmustmeetthefollowingrequirements:Eachrowmustbetallenoughtoensurethat
imagesarenotcutoff.Eachrowmustcontainfivecolumns.Thewidthofthecolumnsmustnot
changewhenthescreenisresizedorrotated.Youneedtodefinethestyleforthegrid.Which
CSS3styleshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:C
QUESTION22
92YouimplementanapplicationbyusingHTML5andJavaScript.Youcreateawebpagethat
containsthefollowingHTML:
TheapplicationmustplaceaborderononlythefirstULelementthatiscontainedintheDIV
element.Youneedtoupdatethewebpage.Whatshouldyoudo?
A.
B.
C.
D.
CorrectAnswer:C
QUESTION23
93YoutroubleshootawebpagethatcontainsthefollowingHTMLelement:<canvasid=
clickCanvaswidth300>height=300>
YourbrowserdoesnotsupporttheHTML5canvas.</canvas>
ThefollowingJavaScriptcodeisincludedinascripttagintheHEADsectionofthewebpage:(Line
numbersareincludedforreferenceonly.)
YouneedtoinvoketheclickReporter()JavaScriptfunctionwhenauserclicksthemouseonthe
canvasHTMLelement.Whatshouldyoudo?
A.AddthefollowingattributetothecanvasHTMLelement:clicked=clickReporter()
B.Replacethecodesegmentatline06withthefollowingcodesegment:drawBox.Click+=
clickReporter;
C.Insertthefollowingcodesegmentatline07:canvas.onclick=clickReporter;
D.Insertthefollowingcodesegmentatline07:canvas,click=clickReporter;
CorrectAnswer:C
QUESTION24
94YouareimplementinganapplicationbyusingHTML5andJavaScript.Awebpagecontainsthe
followingHTMLtable.
Theapplicationmust:
Identifyallrowsinthetablebodythathaveaclassattributeofselected
Excludethelastselectedrowinthetable
Youneedtoimplementthewebpageaccordingtotherequirements.WhichCSSselectorshould
youuse?
A.tr:not(tr:lastchild).selected<#dataTable
B.#dataTable>tr.selected:not(tr:lastchild)
C.#dataTabletbodytr.selected:not(tr:lastchild)
D.#dataTabletr.selected:not(tr:lastchild)
CorrectAnswer:C
QUESTION25
95Youcreateanapplicationthatsendsinformationtoawebservicebyusingthefollowingcode:
(Linenumbersareincludedforreferenceonly.)
Whenthewebservicereturnsanonzeroresultcode,youmustraiseanexceptionthatcontains
theresultcode.Youneedtoimplementthecodethatgeneratestheexception.Whichlineof
codeshouldyouinsertatline04?
A. CustomError.prototype=Error.prototype;
B. CustomError[ErrorType]=Error;
C. CustomError.customError=true;
D. Errorconstructor=CustomError;
CorrectAnswer:A
QUESTION26
96YouaredevelopingacustomerwebformthatincludesfollowingHTML.<inputid=
textAccountType/>
Youneedtodeveloptheformsothatcustomerscanenteronlyavalidaccounttypeconsistingof
twoEnglishalphabetcharacters.Whichcodesegmentshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:B
QUESTION27
97YouaredevelopinganapplicationthatusesaJavaScriptlibrary.Thelibrarycontainsthe
followingfunctions.
Theapplicationusesthefollowingcode.(Linenumbersareincludedforreferenceonly.)
Thelibrarymaythrowmanytypesofexceptions.Theexceptionsaregroupedbycategory.
Youneedtocatchandidentifytheexceptionsbygroup.
Whichcodesegmentshouldyouinsertatline05?
A.
B.
C.
D.
CorrectAnswer:B
QUESTION28
98DRAGDROPYoudevelopanHTML5webpage.YouhavethefollowingHTMLmarkup:
YoualsohavethefollowingJavaScriptvariabledefined:varlanguages=[];
YouneedtoaddstatementstoanexistingJavaScriptfunctiontosortthelistitems.Whichfour
actionsshouldyouperforminsequence?(Developthesolutionbyselectingtherequiredcode
segmentsandarrangingtheminthecorrectorder.)
SelectandPlace:
CorrectAnswer:
QUESTION29
99DRAGDROPYoucreateanHTML5webpage.YouhavethefollowingHTMLmarkup:
YoualsohavethefollowingJavaScriptcodesegment:varjsonFruit={apples:12,bananas:
8,watermelon:3}
YouneedtoaddadditionalrowstothefruitTableelementbyprocessingthejsonFruitvaluesin
theorderlisted.Whichthreeactionsshouldyouperforminsequence?
(Developthesolutionbyselectingtherequiredcodesegmentsandarrangingtheminthecorrect
order.)
SelectandPlace:
CorrectAnswer:
QUESTION30
100DRAGDROPYouhavethefollowingcode:
ThewebservicereturnsaJSONobjectthatcontainstwopropertiesnamedDescriptionand
FileName.ThePersonImageobjectmustmeetthefollowingrequirements:
Createanobjectthatrepresentsanimagethatwillbedisplayed.
Settheimagepropertiesfromthevaluesthatarereturnedbythewebservice.
.ExposetheimageasapropertyofthePersonImageobject.
Youneedtoinsertcodeatline13tocompletetheimplementationofthePersonImageobject.
Whichthreeactionsshouldyouperforminsequencetocompletetheimplementation?
(Developthesolutionbyselectingtherequiredcodesegmentsandarrangingtheminthecorrect
order.)
SelectandPlace:
CorrectAnswer:
QUESTION31
101HOTSPOTYoudevelopanHTMLmessagingapplicationthatallowsuserstosendmessages.
Themessagescanhaveanoptionalfileattachmentthatisidentifiedbyafilename.Youusethe
followingfunctiontosendamessage:
Youneedtosendamessagewithafileattachment.Howshouldyoucompletetherelevantcode?
(Toanswer,selecttheappropriateoptionfromeachdropdownlistintheanswerarea.)
CorrectAnswer:
QUESTION32
102DRAGDROPYoudevelopanHTMLapplicationthatcallsawebservicetoretrieveJSONdata.
ThewebservicecontainsonemethodnamedGetFullNamethatreturnsanObjectnameddata.
ThedataobjectcontainstwopropertiesnamedGivenNameandSurname.Youneedtoloaddata
fromthewebservicetothewebpage.Howshouldyoucompletetherelevantcode?(Toanswer,
dragtheappropriatecodesegmentorcodesegmentstothecorrectlocationorlocationsinthe
answerarea.Useonlycodesegmentsthatapply.)
SelectandPlace:
CorrectAnswer:
QUESTION33
103DRAGDROPAcompanyasksyoutocreateafunctionthatdisplaysloanamountstotheir
customers.YoumustcreatethefunctionbyusingJavaScripttomeetthefollowingrequirements:
Displaythreedifferentloanamountstoeachcustomer.
Displayloanamountsinorderstartingwiththegreatestamountandendingwiththeleast
amount.
Youneedtoimplementthefunction.Howshouldyoucompletetherelevantcode?(Toanswer,
dragtheappropriatecommandorcommandstothecorrectlocationorlocationsintheanswer
area.Useonlycommandsthatapply.)
SelectandPlace:
CorrectAnswer:
QUESTION34
104HOTSPOTYoudevelopanHTML5applicationthatallowsimagestobedraggedanddropped
withinawebpage.ThewebpagecontainsaDIVelementandfourIMGelementsasdefinedinthe
codesegmentbelow:
Youneedtoenabledraganddropfortheapplication.Howshouldyoucompletetherelevant
code?(Toanswer,selecttheappropriateoptionfromeachdropdownlistintheanswerarea.)
HotArea:
CorrectAnswer:
QUESTION35
105DRAGDROPYouarecreatingafunctionnamedgetText().
Thefunctionmustretrieveinformationfromtextfilesthatarestoredonawebserver.Youneed
todevelopthefunctiontomeettherequirement.Whichcodesegmentorsegmentsshouldyou
use?(Toanswer,dragtheappropriatecommandfromthelistofcommandstothecorrect
locationorlocationsintheworkarea.
Eachcodesegmentmaybeusedonce,morethanonce,ornotatall.Youmayneedtodragthe
splitbarbetweenpanesorscrolltoviewcontent.)
SelectandPlace:
CorrectAnswer:
QUESTION36
106DRAGDROP
Youaredevelopinganapplicationforaretailstore.Theapplicationwillbeusedonmobiledevices
toproviderealtimedirectionstothestore.
Youhavethefollowingrequirements:
Theapplicationmustfindoutauserslocation.
Astheusermoves,theapplicationmustupdatethescreenwiththenewlocation.
Astheusermoves,theapplicationmustdisplaytheusersspeed.Youneedtodevelopthe
applicationtomeettherequirements.Whichcodesegmentorsegmentsshouldyouuse?
(Toanswer,dragtheappropriatecodesegmentorsegmentstothecorrectlocationinthe
workarea.Eachcodesegmentmaybeusedonce,morethanonce,ornotatall.Youmay
needtodragthesplitbarbetweenpanesorscrolltoviewcontent.)
SelectandPlace:
CorrectAnswer:
QUESTION37
107HOTSPOTYoudevelopawebpage.YoucreatethefollowingHTMLmarkup:
Thelayoutofthewebpagemustcontainthreerows.
Thefirstrowspanstheentirewidthofthepageandislabeled#Top.
Thesecondrowcontainsthreecolumns.
Thefirstcolumnislabeled#Left;thesecondcolumnislabeled#Main;andtherightcolumnis
labeled#Right.
The#Leftand#Rightcolumnsareafixedwidth.
The#Maincolumnoccupiestheremainingavailablespace.
Thethirdandfinalrowspanstheentirewidthofthepageandislabeled#Bottom.
Thelayoutofthewebpagemustresemblethefollowingimage:
YouneedtocreatetheCSSstylestoimplementthelayout.Howshouldyoucompletetherelevant
styles?(Toanswer,selecttheappropriateoptionfromeachdropdownlistintheanswerarea.)
CorrectAnswer:
QUESTION38
108DRAGDROPYoudevelopanHTMLapplicationthatcallsaSimpleObjectAccessProtocol
(SOAP)webservicetoretrievedata.Youneedtoloaddatafromthewebservice.Whatshould
youdo?(Toanswer,dragtheappropriatecodesegmentorcodesegmentstothecorrectlocation
orlocationsintheanswerarea.Useonlycodesegmentsthatapply.)
SelectandPlace:
CorrectAnswer:
QUESTION39
109HOTSPOTYouarecreatingacustomstylebyusingCSS3.Youhavethefollowing
requirementstocompletethestyle:
Ifthetextinalinemustwraptoanotherline,thelastwordmustbeabletobreakacross
lines.
Alltextmustbeblackandhaveablueshadow,suchthatthetextappearstoglowblue.
Thetextmustlooklikethefollowing:
YouneedtocompletetheCSS3style.Howshouldyoucompletetherelevantcode?(Toanswer,
selecttheappropriateoptionfromeachdropdownlistintheanswerarea.)
HotArea:
CorrectAnswer:
QUESTION40
110HOTSPOTYouaredevelopingawebpage.Thewebpagemustdisplayacontainer.The
containermustdisplaythreecoloredrectanglesnearthetopofthecontainer.Thecolored
rectanglesare,inorder,green,red,andyellow.Therectanglesarealignedhorizontallyandevenly
spacedacrossthewidthofthecontainer.Thelayoutofthepagemustresemblethefollowing
image:
Youneedtoensurethatthepagerendersproperly.Howshouldyoucompletetherelevantstyles?
(Toanswer,selecttheappropriateoptionfromeachdropdownlistintheanswerarea.)
CorrectAnswer:
QUESTION41
111DRAGDROPYoucreatethefollowingJavaScriptcode:
YoumustcompletetheShowCanWeAfford()function:
DisplaythemessageDenied!IfthePaymentAmountvariableisgreaterthan500.
DisplaythemessageApproved!IfthePaymentAmountvariableislessthan300.
DisplaythemessageApprovedwithcaution!IfthePaymentAmountvariableislessthan
500andgreaterthan300.
YouneedtoaddstatementstotheShowCanWeAfford()JavaScriptfunctiontomeetthe
requirements.
Whichthreeactionsshouldyouperforminsequence?(Developthesolutionbyselectingthe
requiredcodesegmentsandarrangingtheminthecorrectorder.)
SelectandPlace:
QUESTION42
112DRAGDROPYouhaveawebpagethatincludesthefollowingmarkup:
AnXMLfilenamedmessage.xmlresidesonawebserver.Thestructureofthefileisasfollows:
YouaredevelopingacodebasedsolutiontoparsethecontentsoftheXMLfileanddisplaythe
informationonthepage.Thesolutionmustworkonbothmodernandolderbrowsers.
YouneedtodisplaytheinformationfromtheXMLfileontothepage.Howshouldyoucreatethe
JavaScriptcode?(Developthesolutionbyselectingtherequiredcodesegmentsandarranging
theminthecorrectorder.Youmaynotneedallofthecodesegments.)
SelectandPlace:
CorrectAnswer:
QUESTION43
113HOTSPOTYoureviewawebformthatcontainsthefollowingmarkupandcode:
You
needtoascertainhowthewebpagerespondswhenitloadsandhowitreactstouseractions.
Foreachstatementinthetable,selectYesifthecodesegmentabovecausesthepagetobehave
asdescribed.SelectNoifitdoesnot.Makeonlyoneselectionineachcolumn.
HotArea:
CorrectAnswer:
QUESTION44
114HOTSPOTYoutestawebpagethatcontainsthefollowingJavaScriptcode:
Thewebpagealsocontainsthefollowingmarkup:
You
needtoascertainhowthewebpagerespondswhentheuserenterscharactersandthenclicksthe
addanddividebuttons.
Foreachstatementinthetable,selectYesiftheactioncausesthewebpagetobehaveas
described.SelectNoifitdoesnot.Makeonlyoneselectionineachcolumn.
HotArea:
CorrectAnswer:
QUESTION45
115AnHTMLpagecontainsnoembeddedJavaScriptorCSScode.Thebodyofthepagecontains
onlythefollowinglineofcode.<pid=test>test</p>ACSSstylesheetmustbeapplied
dynamically.Thestylemustvisiblychangetheappearanceoftheparagraphonthepage.
Youneedtoapplyastyletheparagraph.Whichlineofcodeshouldyouuse?
A.
B.
C.
D.
document.getElementById(test).style.border=0;
document.getElementById(test).style.position=static;
document.getElementById(test).style.padding=15px;
document.getElementById(test).style.top=5px;
CorrectAnswer:C
QUESTION46
116YoudevelopanHTML5webapplication.Thewebapplicationcontainsaformthatallows
userstoenteronlytheirmonthofbirth.Thevaluethattheusersentermustbenumbersbetween
1and12,inclusive.
Youneedtoimplementtheformelementforthemonthofbirth.Whichelementshouldyouuse?
A.
B.
C.
D.
<inputtype=timeoptions=month/>
<inputtypes=submitvalue=month/>
<inputtype=rangemin=lmax=12/>
<inputtype=monthitemscope=numeric/>
CorrectAnswer:C
QUESTION47
117YouaredevelopinganHTML5webapplicationforanarchitecturalcompanythatdisplays
architecturalblueprints.Theapplicationmust:
Displaytheblueprintsatdifferentzoomlevelswithoutlossofdetail
Printtheblueprintswithoutlossofdetail
Workfromonlyonesourcefileperblueprint
Youneedtoensurethatblueprintsdisplayaccordingtotherequirements.
WhichHTML5elementshouldyouuse?
A.
B.
C.
D.
CANVAS
SAMP
SVG
AREA
CorrectAnswer:C
QUESTION48
118YoudevelopanHTML5applicationthatallowsuserstouploadfilesfromtheirlocal
computers.
Theuserinterfacemustremainresponsiveduringtheupload.Youneedtoimplementthefile
uploadfunctionalityfortheapplication.Whichtwoactionsshouldyouperform?(Eachcorrect
answerpresentsacompletesolution.Choosetwo.)
A.
B.
C.
D.
UseanHTMLformwithafiletypeINPUTelementthattargetsahiddenIFRAMEelement.
UseafiletypeINPUTelement,andthenusetheWebStorageAPItouploadthefile.
UseaFormDataobjectanduploadthefilebyusingXMLHttpRequest.
RegisterthefileprotocolbyusingprotocolhandlerregistrationAPIandthenuploadthefile
byusingXMLHttpRequest.
E. UsetheFileSystemAPItoloadthefile,andthenusethejQuerypostmethodtouploadthe
filetotheserver.
CorrectAnswer:BD
QUESTION49
119Youaredevelopingawebapplicationthatcanfunctionwhenusersarenotconnectedtothe
Internet.
YouneedtochecktheInternetconnectivitystatusofausersbrowser.
Whichmethodshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:A
QUESTION50
120Youarecreatingapagethatcontainsdetailedemployeeinformationforacompanyportal.
ThepageusesajQuerylibrary.
ThepagecontainsahiddenbuttonnamedbtnEditthatisdefinedbythefollowingcode.<button
id=btnEditstyle=display:none;n>Edit</button>
Thebuttonisnotdisplayedbydefault.Thebuttonmustbedisplayedonlyiftheuserisloggedon.
Youneedtoaddcodetothedocument.ready()functiontomeettherequirementsforthebutton.
Whichlineofcodeshouldyouuse?
A.
B.
C.
D.
$(#btnEdit).appear();
$(#btnEdit).visible=true;
$(#btnEdit).show();
$(#btnEdit).Visible();
CorrectAnswer:B
QUESTION51
121HOTSPOTYoutroubleshootawebpagethatincludesthefollowingcodesegment:
Youneedtoevaluatethevalueofthevariablenamedcustomer.name.Foreachstatementinthe
table,selectYesifthecodesegmentabovecausesthevariabletoevaluateasdescribed.SelectNo
ifitdoesnot.Makeonlyoneselectionineachcolumn.
HotArea:
CorrectAnswer:
QUESTION52
122HOTSPOTYoudevelopanHTML5webpagethatcontainsthefollowingmarkupandcode:
Youhavethefollowingrequirements:
DisplayamessageifusersselectthefirstOPTIONelement,andthensubmittheform.
DonotdisplayanalertmessageifusersselectanyotherOPTIONelement,andthensubmit
theform.
YouneedtoimplementthemadeSelection()function.
Howshouldyoucompletetherelevantcode?(Toanswer,selecttheappropriatecodesegment
fromeachdropdownlistintheanswerarea.)
HotArea:
HotArea:
CorrectAnswer:
QUESTION53
123HOTSPOT
Youdevelopawebpagethatconsumesawebservice.Thewebserviceprovidescurrency
exchangerates.VisitorsenterthecurrencytypeonthewebpageandpresstheSubmitbutton.
Thewebservicereturnsthecurrentexchangerate.Youneedtoensurethatthewebpagealways
displaysthemostcurrentinformation.Howshouldyoucompletetherelevantcode?(Toanswer,
selecttheappropriateoptionfromeachdropdownlistintheanswerarea.)
HotArea:
HotArea:
CorrectAnswer:
QUESTION54
124HOTSPOTYoudevelopawebpage.Thelayoutofthewebpagemustresemblethefollowing
image:
Youneedtoensurethatthepagerendersproperly.HowshouldyoucompletetherelevantCSS
styles?(Toanswer,selecttheappropriateoptionfromeachdropdownlistintheanswerarea.)
HotArea:
CorrectAnswer:
QUESTION55
125HOTSPOT
AcompanyhasanXMLfilenamedproducts.xmlonawebserver.Thefilecontainsalistofthe
productsthatthecompanysells.Youneedtodisplaythecontentsoftheproducts.xmlfileinaDIV
elementnamedOutput.Howshouldyoucompletetherelevantcode?(Toanswer,selectthe
appropriateoptionfromeachdropdownlistintheanswerarea.)
HotArea:
CorrectAnswer:
QUESTION56
126YouaredevelopinganapplicationthatanalyzespopulationdataformajorcitiesintheUnited
States.
Theapplicationretrievespopulationstatisticsforacitybyusingawebservice.
YouneedtorequestdatafromthewebservicebyusingjQuery.
Whichcodesegmentshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:D
QUESTION57
127Youaredevelopingablogwebpagethatisbeingoptimizedforaccessibility.Thepage
includesthefollowingHTML.
Theheadingtagsrepresentablogposttitle,ablogpostsubtitle,andtheauthorsname.Youneed
toensurethatthethreeheadingsaretreatedasaunitbutretaintheirindividualformatting.
WhichtagsshouldyouusetowraptheH1,H2,andH3elements?
A.
B.
C.
D.
<group></group>
<header></header>
<hgroup></hgroup>
<headings></headings>
CorrectAnswer:C
QUESTION58
128YoudevelopawebapplicationbyusingjQuery.YoudevelopthefollowingjQuerycode:(Line
numbersareincludedforreferenceonly.)
ThewebapplicationexposesaRESTfulwebAPIthathasanendpointof/product/create.
YouneedtocreateanewproductbyusingAJAX.
Whichcodesegmentshouldyouinsertatline05?
A.
B.
C.
D.
CorrectAnswer:D
QUESTION59
129Youdevelopawebpagethatallowsausertodownloada3PEGimageandconvertittoaPNG
file.YouneedtoimplementthecodetodownloadthecontentsoftheJPEGimagewithno
additionaldecoding.WhichJavaScriptfunctionshouldyouuse?
A.
B.
C.
D.
readAsBinaryString()
readAsArrayBuffer()
readAsDataURL()
readAsText()
CorrectAnswer:B
QUESTION60
130Youaremodifyingablogsitetoimprovesearchenginereadability.
Youneedtogrouprelevantpagecontenttogethertomaximizesearchenginereadability.
Whichtagshouldyouuse?
A.
B.
C.
D.
<article>
<span>
<tbody>
<cd>
CorrectAnswer:A
QUESTION61
131DRAGDROPYouaredevelopingasharedlibrarytoformatinformation.
Thelibrarycontainsamethodnamed_private.The_privatemethodmustneverbecalleddirectly
fromoutsideofthesharedlibrary.
YouneedtoimplementanAPIforthesharedlibrary.
Howshouldyoucompletetherelevantcode?(Developthesolutionbyselectingtherequired
codesegmentsandarrangingtheminthecorrectorder.
Youmaynotneedallofthecodesegments.)
SelectandPlace:
CorrectAnswer:
QUESTION62
132YoudevelopanHTMLapplicationthatcontainsatablethatdisplaysalistofproducts.The
tableisdefinedwiththefollowingHTMLmarkup:
Youmuststylethetabletolooklikethefollowingimage:
YouneedtoimplementtheCSSselectorstoselecttherowsthatmusthaveabluebackground.
WhichCSSselectorshouldyouuse?
A.
B.
C.
D.
thead:onlychild,tbody:after,table:before
tr[line|0,1,3]
tr:firstoftype,tr:lastoftype
tr:firstline,tr:lastchild
CorrectAnswer:C
QUESTION63
133YoudevelopawebpagebyusingHTML5.Youcreatethefollowingmarkup:
<inputtypeurlname=websiterequired=required/>
YouneedtoensurethatthevaluethattheuserenterscontainsasecureURL.
Whatshouldyoudo?
A.
B.
C.
D.
Addthefollowingattributetotheinputtag:value=https://v
Addthefollowingattributetotheinputtag:pattern=https://.+
Addthefollowingattributetotheinputtag:value=ssl
Addthefollowingattributetotheinputtag:itemtype=https
CorrectAnswer:B
QUESTION64
134YoudevelopawebpagebyusingHTML5.Youcreatethefollowingmarkupandcode:(Line
numbersareincludedforreferenceonly.)
Youneedtoensurethatthevaluesthatusersenterareonlynumbers,letters,andunderscores,
regardlessoftheorder.Whichcodesegmentshouldyouinsertatline04?
A.
B.
C.
D.
CorrectAnswer:A
QUESTION65
135HOTSPOTYoudevelopaninteractivescalablevectorgraphics(SVG)application.Youwritethe
followingHTMLmarkupthatmakesarectanglerotate:
Youneedtocontrolthespeedoftherotatingrectangle.
Howshouldyoucompletetherelevantcode?(Toanswer,selecttheappropriateoptionfrom
eachdropdownlistintheanswerarea.)
HotArea:
CorrectAnswer:
QUESTION66
136DRAGDROPYoucreateawebpagethatincludesthefollowingHTMLmarkup:(Linenumbers
areincludedforreferenceonly.)
YouneedtoensurethataformcannotbesubmittedunlesstheINPUTelementcontainstheword
OK.Whichfiveactionsshouldyouperforminsequence?(Toanswer,movetheappropriate
actionsfromthelistofactionstotheanswerareaandarrangetheminthecorrectorder.)
SelectandPlace:
CorrectAnswer:
QUESTION67
137DRAGDROPYouareimplementingawebworkerbyusingJavaScriptandHTML5.Theweb
workerprocessesalongrunningloopandreturnstheresulttoawebpage.Thewebworkeris
definedonthewebpageasfollows:
Youhavethefollowingrequirements:
Evaluatethemessagevalueinthewebworker.
Processtheloopbasedontheiterationsvaluethatispassedfromthewebpage.
Returnavaluebacktothewebpagefromthewebworker.
Youneedtoimplementthewebworker.Howshouldyoucompletetherelevantcode?
(Toanswer,dragtheappropriatecodesegmenttothecorrectlocationorlocationsintheanswer
area.Useonlycodesegmentsthatapply.)
SelectandPlace:
CorrectAnswer:
QUESTION68
138HOTSPOT
Howdoesthepagerender?Foreachstatementinthetable,selectYesifthebehavioris
described.SelectNoifitisnot.Makeonlyoneselectionineachcolumn.
HotArea:
CorrectAnswer:
QUESTION69
139YouarecreatinganHTML5applicationthatallowsuserstoplayvideoonapagebyusingthe
VIDEOelement.
Youneedtoenabletheusertostart,stop,andpausethevideo.
Whichlineofcodeshouldyouaddtothepage?
A. <videoid=myVideoheight=320width=400src=myVideo.vtt
contextmenu=pauseplay></video>
B. <videoid=myVideonheigh=320width=400src=myVideo.vttcontrols></video>
C. <video_d=myVideonheight=320width=400src=myVideo.vttautoplay></video>
D. <videoid=myVideoheight=320width=400src=myVideo.vtt
contextinenu=Startstopn></video>
CorrectAnswer:B
QUESTION70
140Youarecreatingawebpagethatcontainsacanvaswithtext.
ThepagecontainsthefollowingJavaScriptcode.(Linenumbersareincludedforreferenceonly.)
Thetextonthecanvasmustrotate90degreeswhenauserclicksabuttononthepage.
Youneedtoensurethatthetextrotateswhentheuserclicksthebutton.
Whichlineofcodeshouldyouaddatline03?
A.
B.
C.
D.
context.transform(90);
context.content.getRotation(90);
context.rotate(90);
context.content.rotate(90);
CorrectAnswer:C
QUESTION71
141YoudevelopanHTML5webpagethatcontainsthefollowingHTMLmarkup:
Youhavethefollowingrequirements:
RetrievethecontentforanyOPTIONelementswhenthevalueoftheselectedattribute
equalsselected.
Addthecontenttoacommaseparatedstring.
Youneedtoretrievetherequireddata.
Whichtwocodesegmentsshouldyouaddtothewebpage?(Eachcorrectanswerpresentsa
completesolution.Choosetwo.)
A.
B.
C.
D.
E.
CorrectAnswer:BD
QUESTION72
142DRAGDROPYouarecreatingafunctionbyusingJavaScript.Youhavethefollowing
requirements:
ThefunctionmustdisplayloanamountstotheuserwithinthefollowingHTMLelement:<div
id=display></div>
Theloanamountof2100mustdisplayintheHTMLelement.Alldeclaredvariablesandfunctions
mustbescopedtothemyAppvariable.
Youneedtoimplementthefunction.Howshouldyoucompletetherelevantcode?
(Toanswer,dragtheappropriatecodesegmentstothecorrectlocationorlocationsintheanswer
area.Useonlycodesegmentsthatapply.)
SelectandPlace:
CorrectAnswer:
QUESTION73
143HOTSPOTYoucreateacustomstylebyusingCSS3.Aboxwithroundedcornersmustappear
aroundtext.Theboxmustmatchthefollowingillustration:
YouneedtoaddtheCSS3markuptoyourstyle.HowshouldyoucompletetherelevantCSS
styles?(Toanswer,selecttheappropriateoptionfromeachdropdownlistintheanswerarea.)
HotArea:
CorrectAnswer:
QUESTION74
144HOTSPOT
YouimplementacallbackfunctionbyusingJavaScript.YouneedtoprocessthereturnedXML
data.Howshouldyoucompletetherelevantcode?(Toanswer,selecttheappropriateoptionfrom
eachdropdownlistintheanswerarea.)
HotArea:
CorrectAnswer:
QUESTION75
145YoudevelopanHTML5application.Yougiveusersanumericaccesscodethatcanbeused
onlyonetime.
Usersmustenterthenumericaccesscodeintheloginformoftheapplication.
Thenumericcharactersmustbehiddenbyamaskingcharacter.
Youneedtoimplementtheformelementforuserstoenterthecode.
WhichHTMLelementshouldyouuse?
A.
B.
C.
D.
<inputtype=passwordrequiredautocomplete=off>
<inputtype=inputautocomplete=offrequired/>
<inputtype=passwordstytemvisiblity:hidden;required/>
<inputtype=buttonvalue=passwordrequired/>
CorrectAnswer:A
QUESTION76
146YouaredevelopinganHTML5webapplicationthatdisplaysstockinformation.The
applicationloadsinformationfromawebservicebyusingAJAX.
ThefollowingcodedefinesaStockobjectandloadsstockdata.
YouneedtoimplementtheloadStockfunction.Whichcodesegmentshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:A
QUESTION77
147HOTSPOTYoureviewawebpagethatcontainsthefollowingmarkup:
Howdoesthepagerender?Foreachstatementinthetable,selectYesifthebehavioris
described.SelectNoifitisnot.Makeonlyoneselectionineachcolumn.
HotArea:
CorrectAnswer:
QUESTION78
148DRAGDROPYoucreateanHTML5applicationthatincludesJavaScript.Theapplication
performsseveralAJAXrequests.OneAJAXrequestretrievesorderinformationfromawebservice
andthensendstheinformationbacktoawebpagewithintheapplication.Youmustcreatea
customevent.
Youhavethefollowingrequirements:
ThewebpagemustcontainanHTMLelementnamedordersListingthatwillreceivethe
customeventnotification.
TheeventnamemustbeordersReceived.
TheeventmustpassacustomvaluenamedorderCount.
TheeventmustrunaJavaScriptmethodnamedshowOrdersReceivedCountaftertheorders
ListingHTMLelementreceivestheevent.
DonotallowotherDOMelementstoreceivetheevent.
Allowtheeventtobecancelled.
Sendtheeventintotheeventsystem.
YouneedtoimplementthecustomeventtonotifyspecificDOMelementsoftheAJAXresponse.
Whichthreeactionsshouldyouperforminsequence?(Developthesolutionbyselectingthe
requiredcodesegmentsandarrangingtheminthecorrectorder.)
SelectandPlace:
CorrectAnswer:
QUESTION79
149DRAGDROPYouaredevelopinganapplicationbyusingJavaScript.
Youmustwriteafunctionthatreturnsthesumofthevariablesnamedv1,v2,v3,v4.
Youneedtocompletethesumfunction.Howshouldyoucompletetherelevantcode?(To
answer,dragtheappropriatecodesegmentorsegmentstothecorrectlocationorlocationsin
theanswerarea.Useonlycodesegmentsthatapply.)
SelectandPlace:
CorrectAnswer:
QUESTION80
150YouaredevelopingawebpagethatincludesthefollowingHTML.<spanid=myTextSpan
class=redText>HelloThere!</span>
Thefontcoloroftextinsidethespanmustbered.Youneedtodevelopthewebpagetomeetthe
requirement.WhichtwoCSSsegmentswillachievethegoal?(Eachcorrectanswerpresentsa
completesolution.Choosetwo.)
A.
B.
C.
D.
CorrectAnswer:AC
QUESTION81
151Youaretroubleshootinganapplication.UsersreportthattheUIisslowtorespond.
YouneedtoimproveUIresponsivenessbymovingapplicationtaskstowebworkers.
Whichtwotaskscanyoumovetoachievethisgoal?(Eachcorrectanswerpresentsacomplete
solution.Choosetwo.)
A. AfunctionthatloopsthroughtheDocumentObjectModeltoupdatethestyleofpage
elements
B. Alongrunningcalculationthatrequiresloopingthroughanarray
C. Afunctionthatperformsgraphicintensiveanimation
D. Afunctionthatstoreslargeamountsofdatatolocalstorage
CorrectAnswer:BC
QUESTION82
152Youdevelopaninteractivescalablevectorgraphic(SVG)application.
Youwritethefollowingcode(Linenumbersareincludedforreferenceonly.):
Youneedtoincreasethesizeofthecircleby50percent.Whichcodesegmentshouldyouinsert
atline02?
A.
B.
C.
D.
CorrectAnswer:B
QUESTION83
153YoudevelopanHTML5webpage.YouhavethefollowingHTMLmarkup:
Youneedtochangethebackgroundcolorforalloftheelementswhosenameattributeendswith
thewordname.Whichcodesegmentshouldyouaddtothewebpage?
A.
B.
C.
D.
$(#name).css({backgroundcolor:#E0ECF8});
$(input[name|=name;]).css((backgroundcolor:#E0ECF8});
$(input[name$=name]).css{{backgroundcolor:#E0ECF8});
$(*name).css({backgroundcolor:#E0ECF8});
CorrectAnswer:C
QUESTION84
154YoudevelopanHTMLapplicationthatislocatedatwww.adventureworks.com.The
applicationmustloadJSONdatafromwww.fabrikam.com.Youneedtochooseanapproachfor
loadingthedata.Whatshouldyoudo?
A.
B.
C.
D.
DesignaRESTURIschemewithmultipledomains.
ConfigureCrossOriginResourceSharing(CORS)ontheservers.
LoadthedatabyusingWebSockets.
UsethejQuerygetJSONmethod.
CorrectAnswer:B
QUESTION85
155Youarebuildingawebpageforanewspaperpublisher.Youhavethefollowingrequirements:
Thewebpageshouldsplitthecontentintocolumnsthatareatleast100pixelswide.
Thenumberofcolumnsdisplayedmustbesetbythebrowser.
YouneedtoimplementthecorrectCSSproperties.
Whichlineofcodeshouldyouuse?
A.
B.
C.
D.
<divid=outerstyle=width:100px;columnfill:balance;></div>
<divid=outerstyle=width:100px;columngap:10px;></div>
<divid=outerstyle=columnwidth:100px;>...</div>
<divid=outerstyle=width:100px;columns:100px3></div>
CorrectAnswer:C
QUESTION86
156YoudevelopawebpagewithastandardinputcontrolbyusingHTML5.Theinputcontrol
mustdisplaythetextEnteryourgivenname,asshownbelow:
Whenauserselectstheinputcontrol,thetextmustdisappear.Youneedtocreatetheinput
control.Whichinputcontrolshouldyouuse?
A.
B.
C.
D.
<inputname=GivenNamevalue=Enteryourgivenname/>
<inputname=GivenNamedefault=Enteryourgivenname/>
<inputname=GivenNametext=Enteryourgivenname/>
<inputname=GivenNameplaceholder=Enteryourgivenname/>
CorrectAnswer:D
QUESTION87
157YoudevelopanHTML5webpage.YouhavethefollowingHTMLmarkup:
Youneedtoaddabackgroundcolortothefirstarticleineachsection.Whichcodesegment
shouldyouaddtothewebpage?
A. $(sectionarticle:firstchild).css(backgroundcolor,#f2f2f2);
B. $(section:firstchild).ess(backgroundcolor,#f2f2f2);
C. $(article:firstoftype).css(backgroundcolor,#f2f2f2);
D. $(section:firstoftype).css(backgroundcolor,#f2f2f2);
CorrectAnswer:C
QUESTION88
158Youarecreatingacustomobjectasdescribedbythefollowingcode.
YouneedtoimplementthecalcAreamethod.Whichcodeshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:D
QUESTION89
159DRAGDROPYouaredevelopingawebpagethatincludesthefollowingHTML.
You
needtoensurethattheemailelementisenabledonlyiftheuserselectstheITSupportcheckbox.
WhichCSSselectorsshouldyouuse?(Toanswer,dragtheappropriateselectortothecorrect
location.
Eachselectormaybeusedonce,morethanonce,ornotatall.
Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)
SelectandPlace:
CorrectAnswer:
QUESTION90
160YouaredevelopinganHTML5webformtocollectfeedbackinformationfromsitevisitors.
ThewebformmustdisplayanINPUTelementthatmeetsthefollowingrequirements:
Allownumericvaluesbetween1and10.
Defaulttothevalueof5.
Displayasaslidercontrolonthepage.
YouneedtoaddtheINPUTelementtotheform.WhichHTMLelementshouldyouadd?
A. Rating(Between1and10):<inputtype=numbername=ratingmin=1max10>
B. Rating(Between1and10):<inputtype=numbername=ratingmin=1max=10
defaulc=5>
C. Rating(Between1and10):<inputtype=rangename=ratingmin=0max=10
default=5>
D. Rating(Between1and10):<inputtype=rangename=ratingmin=10max=10
value=5>
CorrectAnswer:D
QUESTION91
161YoudevelopanHTML5application.Theapplicationusesanimagethatisreturnedfroman
HTTPPOSTrequest.
Youdevelopthefollowingcode:(Linenumbersareincludedforreferenceonly.)
Youneedtodisplaytheloadedimageintheapplication.Whichcodesegmentshouldyouinsertat
line04?
A.
B.
C.
D.
CorrectAnswer:B
QUESTION92
162YoudevelopanHTML5webpagethatcontainsthefollowingHTMLmarkup:<input
id=loanTermTextBoxtype=text/>
Usersmustenteravalidintegervalueintothetextbox.Youneedtovalidatethedatatypethatis
receivedfromtheinputelement.
Whichtwocodesegmentsshouldyouincludeonthewebpage?
(Eachcorrectanswerpresentsacompletesolution.Choosetwo.)
A.
B.
C.
D.
E.
CorrectAnswer:AB
QUESTION93
163YoudevelopanHTML5applicationforacompany.Employeesmustenterapersonal
identificationnumber(PIN)inanINPUTelementnamedSecurityCodetoaccesstheiremployee
records.
TheSecurityCodeelementmustmeetthefollowingrequirements:
Allowupto6digits.
Donotdisplaynumbersastheyareentered.
DisplaythetextEnterPINCodebeforetheuserentersanydata.
YouneedtoimplementtheSecurityCodeelement.
WhichHTMLmarkupshouldyouaddtotheapplication?
A.
B.
C.
D.
E.
CorrectAnswer:D
QUESTION94
164DRAGDROPYoudevelopanHTML5webpage.YouhavethefollowingHTMLmarkup:
YouneedtoupdatethecontentoftheDIVelementwhenthemousehoversoveranimageand
whenthemousecoordinateschange.
Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriatecodesegmentto
thecorrectlocationorlocationsintheanswerarea.
Useonlycodesegmentsthatapply.)
SelectandPlace:
CorrectAnswer:
QUESTION95
165HOTSPOTYouarecreatingacustomCSS3style.Youhavethefollowingrequirementsto
completethestyle:
box1hasaredoutline.
box1containsbox2,andbox2mustremaininsidebox1
box2musthaveagreentoblackgradient.
box2mustbesurroundedbywhitespace.
Thestyleresemblesthefollowingdiagram:
YouneedtoaddtheCSS3codetothestyles.Howshouldyoucompletetherelevantcode?(To
answer,selecttheappropriatecodesegmentineachdropdownlistintheanswerarea.)
HotArea:
CorrectAnswer:
QUESTION96
166YoudevelopanapplicationtohostusergeneratedHTMLandJavaScriptcontent.Acommon
errorhandlerinyourapplicationmustprocessallunhandlederrors.Youneedtoimplement
globalerrorhandlingfortheapplication.Whichcodesegmentshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:A
QUESTION97
167Youarecreatingacustomfunction.YoupassanobjectnamedtestObjtothefunctionasa
parameter.Youdonotuseinheritancethroughthefunctions.Thefunctionmustestablish
whethertestObjinheritsfromanotherobjectnamedparentObj.Youneedtoensurethatthe
functionperformsasrequired.Whichmethodoroperatorshouldyouaddtothefunction?
A.
B.
C.
D.
parentObj.instanceof(testObj)
testObj.isPrototypeOf(parentObj)
testObj.instanceof(parentObj)
parentObj.isPrototypeOf(testObj)
CorrectAnswer:B
QUESTION98
168YoudevelopanHTML5webpage.YouhavethefollowingHTMLmarkup:
You
needtocalltheclickeventfortheaddOneltembuttonadeterminednumberoftimeswhenthe
userclickstheaddBoxOfltemsbutton.Whichcodesegmentshouldyouaddtothewebpage?
A.
B.
C.
D.
CorrectAnswer:D
QUESTION99
169HOTSPOTYouarevalidatinguserinputbyusingbuiltinJavaScriptfunctions.Theapplication
must:
StorethevaluethatisenteredinavariablenamedinputValue
UsethebuiltinisNaN(tnputValue)functiontoevaluatethedatatype
YouneedtovalidatethereturnvalueoftheisNaN(inputValue)function.
Whichvalueswillbereturned?(Toanswer,configuretheappropriateoptionsinthedialogboxin
theanswerarea.)
HotArea:
CorrectAnswer:
QUESTION100
1DRAGDROPYouarevalidatinguserinputbyusingJavaScriptandregularexpressions.Agroup
ofpredefinedregularexpressionswillvalidatetwoinputfields:
AnemailaddressinafunctionnamedvalidateEmail(forexample,[email protected])
Aninedigitnumberthatallowsoptionalhyphensafterthesecondandfifthcharacterina
functionnamedvalidateSSN(forexample,555555555or555555555)
Youneedtousethecorrectexpressiontovalidatetheinput.Whichexpressionshouldyouinsert
intoeachfunction?
(Toanswer,dragtheappropriateregularexpressionstatementtothecorrectlocation.Each
regularexpressionstatementmaybeusedonce,morethanonce,ornotatall.Youmayneedto
dragthesplitbarbetweenpanesorscrolltoviewcontent.)
SelectandPlace:
CorrectAnswer:
QUESTION101
2YouaredevelopingacustomerwebformthatincludesthefollowingHTML.<input
id=txtValuetype=text/>
Acustomermustenteravalidageinthetextboxpriortosubmittingtheform.Youneedtoadd
validationtothecontrol.Whichcodesegmentshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:D
QUESTION102
3Youaredevelopingacustomercontactformthatwillbedisplayedonapageofacompanys
website.
Thepagecollectsinformationaboutthecustomer.Ifacustomerentersavaluebeforesubmitting
theform,itmustbeavalidemailaddress.Youneedtoensurethatthedatavalidation
requirementismet.Whatshouldyouuse?
A.
B.
C.
D.
<inputname=emailtype=url/>
<inputname=emailtype=textrequired=required/>
<inputname=emailtype=text/>
<inputname=emailtype=email/>
CorrectAnswer:D
QUESTION103
4DRAGDROPYouaredevelopingaformthatcapturesausersemailaddressbyusingHTML5
andjQuery.
Theformmustcapturetheemailaddressandreturnitasaquerystringparameter.
Thequerystringparametermustdisplaythe@symbolthatisusedintheemailaddress.
Youneedtoimplementthisfunctionality.Howshouldyoudeveloptheform?(Toanswer,drag
theappropriatecodesegmenttothecorrecttargetortargetsinthe
answerarea.Eachcodesegmentmaybeusedonce,morethanonce,ornotatall.Youmayneed
todragthesplitbarbetweenpanesorscrolltoviewcontent.)
SelectandPlace:
CorrectAnswer:
QUESTION104
5YouaredevelopinganapplicationthatconsumesaWindowsCommunicationFoundation(WCF)
service.Theapplicationinteractswiththeservicebyusingthefollowingcode.(Linenumbersare
includedforreferenceonly.)
YouneedtoauthenticatetotheWCFservice.Whatshouldyoudo?
A. Atline11,addthefollowinglinesofcode.
a. ,username:yourusername
b. ,password:yourpassword
B. Atline11,addthefollowinglineofcode.
a. ,credentials:prompt
C. Atline06,replacethecodewiththefollowinglineofcode.
a. url:http://contoso.com/Service.svc/GetCountry?
Username=username&password=psssword,
D. Atline11,addthefollowinglineofcode.
a. TheusernameandpasswordwillbestoredinanXMLfile.
b. ,credentials:credentials.xml
CorrectAnswer:A
QUESTION105
6Youaredevelopingawebpagethatenablescustomerstouploaddocumentstoawebserver.
ThepageincludesanHTML5PROGRESSelementnamedprogressBarthatdisplaysinformation
aboutthestatusoftheupload.
Thepageincludesthefollowingcode.(Linenumbersareincludedforreferenceonly.)
AneventhandlermustbeattachedtotherequestobjecttoupdatethePROGRESSelementon
thepage.
Youneedtoensurethatthestatusoftheuploadisdisplayedintheprogressbar.
Whichlineofcodeshouldyouinsertatline03?
A.
B.
C.
D.
xhr.upload.onloadeddata=
xhr.upload.onplaying=
xhr.upload.onseeking=
xhr.upload.onprogress=
CorrectAnswer:D
QUESTION106
7YouaredevelopingacustomerwebformthatincludesthefollowingHTML.
<labelid=txtValueX/label>
Informationfromthewebformissubmittedtoawebservice.
ThewebservicereturnsthefollowingJSONobject.
{
Confirmation:1234,
FirstName:John
}
YouneedtodisplaytheConfirmationnumberfromtheJSONresponseinthetxtValuelabelfield.
WhichJavaScriptcodesegmentshouldyouuse?
A.
B.
C.
D.
$(#txtValue).val=(JSONObject.Confirmation);
$(#txtValue).val(JSONObject.Confirmation);
$(#txtValue).text=(JSONObject.Confirmation);
$(#txtValue).text(JSONObject.Confirmation);
CorrectAnswer:D
QUESTION107
8HOTSPOTYouaredevelopingawebapplicationthatretrievesdatafromawebservice.Thedata
beingretrievedisacustombinarydatatypenamedbint.The
datacanalsoberepresentedinXML.
TwoexistingmethodsnamedparseXml()andparseBint()aredefinedonthepage.
Theapplicationmust:
Retrieveandparsedatafromthewebserviceusingbinaryformatifpossible.
RetrieveandparsethedatafromthewebserviceusingXMLwhenbinaryformatisnotpossible.
Youneedtodeveloptheapplicationtomeettherequirements.Whatshouldyoudo?(Toanswer,
selecttheappropriateoptionsfromthedropdownlistsintheanswerarea.)
HotArea:
CorrectAnswer:
QUESTION108
9YouaredevelopingacustomerwebformthatincludesthefollowingHTML.<inputid=
txtValue/>
Acustomermustenteravalueinthetextboxpriortosubmittingtheform.
Youneedtoaddvalidationtothetextboxcontrol.
WhichHTMLshouldyouuse?
A.
B.
C.
D.
<inputid=txtValuetype=textrequired=required/>
<inputid=txtValuetype=textpattern=[AZaz]{3}/>
<inputid=txtValuetype=required/>
<inputid=txtValuetype=requiredautocomplete=on/>
CorrectAnswer:A
QUESTION109
10DRAGDROPYouaredevelopingawebpageforrunnerswhoregisterforarace.Thepage
includesaslidercontrolthatallowsuserstoentertheirage.Youhavethefollowingrequirements:
Allrunnersmustentertheirage.
Applicationsmustnotbeacceptedfromrunnerslessthan18yearsofageorgreater
than90years.
Theslidercontrolmustbesettotheaverageage(37)ofallregisteredrunnerswhen
thepageisfirstdisplayed.
Youneedtoensurethattheslidercontrolmeetstherequirements.Whatshouldyoudo?(To
answer,dragtheappropriatewordornumbertothecorrectlocationintheanswerarea.
Eachwordornumbermaybeusedonce,morethanonce,ornotatall.
Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)
SelectandPlace:
CorrectAnswer:
QUESTION110
11YouaredevelopinganHTML5webapplicationthatdisplaysthecurrenttemperature
wheneverabuttonisclicked.Thefollowingcodeprovidesthisfunctionality.
Whenthetemperatureisloaded,thestatuspropertyontheloaderinstancedoesnotchange.
Youneedtoensurethatthestatuspropertyontheloaderinstanceisupdatedwhenthe
temperatureisloaded.
WhichcodesegmentshouldyouusetoreplacetheLoaderfunction?
A.
B.
C.
D.
CorrectAnswer:A
QUESTION111
12YouarecreatingaclassnamedConsultantthatmustinheritfromtheEmployeeclass.
TheConsultantclassmustmodifytheinheritedPayEmployeemethod.TheEmployeeclassis
definedasfollows.
functionEmployee(){}
Employee.prototype.PayEmployee=function(){
alerttHithere!);
}FutureinstancesofConsultantmustbecreatedwiththeoverriddenmethod.
YouneedtowritethecodetoimplementtheConsultantclass.Whichcodesegmentsshouldyou
use?(Eachcorrectanswerpresentspartofthesolution.Choosetwo.)
A. Consultant.PayEmployee=function(){alert(PayConsulant);}
B. Consultant.prototype.PayEmployee=function(){alert(PayConsultant);}
C. functionConsultant(){Employee.call(this);}Consultant.prototype=newEmployee();
Consultant.prototype.constructor=Consultant;
D. functionConsultant(){Employee.call(this);}Consultant.prototype.constructor=
Consultant.create;
CorrectAnswer:BC
QUESTION112
13Youaremodifyinganexistingwebpage.Thepageisbeingoptimizedforaccessibility.The
currentpagecontainsthefollowingHTML.
Standardscompliantscreenreadersmustbeabletoidentifythelinkscontainedwithinthe
navigationstructureautomatically.
Youneedtocreatethenavigationlinkstructureinthepage.
Withwhichcontainertagsshouldyouwraptheexistingmarkup?
A.
B.
C.
D.
<navmap></navmap>
<divid=nav></div>
<nav></nav>
<map></map>
CorrectAnswer:C
QUESTION113
14HOTSPOTYouaredevelopinganairlinereservationwebsitebyusingHTML5andJavaScript.A
pageonthesiteallowsuserstoenterdepartureanddestinationairportinformationandsearch
fortickets.Youhavethefollowingrequirements:
Usersmustbeabletosaveinformationintheapplicationabouttheirfavorite
destinationairport.
Theairportinformationmustbedisplayedinthedestinationtextboxwheneverthe
userreturnstothepage.
Youneedtodevelopthesitetomeettherequirements.
Whichlinesofcodeshouldyouuse?(Toanswer,selecttheappropriateoptionsfromthedrop
downlistsintheanswerarea.)
HotArea:
CorrectAnswer:
QUESTION114
15HOTSPOT
YouaredevelopinganHTML5webapplicationfordisplayingencyclopediaentries.
Eachencyclopediaentryhasanassociatedimagethatisreferredtointheentry.
Youneedtodisplaytheimagebyusingthecorrectsemanticmarkup.
Whatshouldyoudo?(Toanswer,selecttheappropriateoptionsfromthedropdownlistinthe
answerarea.)
HotArea:
CorrectAnswer:
QUESTION115
16YouarecreatingaJavaScriptobjectthatrepresentsacustomer.
YouneedtoextendtheCustomerobjectbyaddingtheGetCommission()method.
YouneedtoensurethatallfutureinstancesoftheCustomerobjectimplementthe
GetCommission()method.
Whichcodesegmentshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:D
QUESTION116
17Youaredevelopingawebformthatincludesthefollowingcode.
Whenauserselectsthecheckbox,aninputtextboxmustbeaddedtothepagedynamically.
Youneedtoensurethatthetextboxisadded.
Whichfunctionshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:B
QUESTION117
18HOTSPOTAnHTMLpagehasacanvaselement.
Youneedtodrawaredrectangleonthecanvaselementdynamically.
Therectangleshouldresemblethefollowinggraphic.
Howshouldyoubuildthecodesegment?(Toanswer,selecttheappropriateoptionsfromthe
dropdownlistsintheanswerarea.)
HotArea:
CorrectAnswer:
QUESTION118
19YouaredevelopinganHTML5pagethathasanelementwithanIDoflogo.Thepageincludes
thefollowingHTML.
<div>
Logo:
<br><divid=logo>
</div>
</div>
Youneedtomovethelogoelementloweronthepagebyfivepixels.
Whichlinesofcodeshouldyouuse?(Eachcorrectanswerpresentspartofthesolution.Choose
two.)
A.
B.
C.
D.
document.getElementById(logo).style.position=relative;
document.getElementByld(logo).Style.top=5px;
document.getElementById(logo).style.top=5px;
document.getElementById(logo).style.position=absolute;
CorrectAnswer:AB
QUESTION119
20YouaredevelopingawebpagebyusingHTML5andC5S3.Thepageincludesa<div>tagwith
theIDsettovalidate.
Whenthepageisrendered,thecontentsofthe<div>tagappearonalineseparatefromthe
contentaboveandbelowit.
Therenderedpageresemblesthefollowinggraphic.
Thepagemustberenderedsothatthe<div>tagisnotforcedtobeseparatefromtheother
content.Thefollowinggraphicshowsthecorrectlyrenderedoutput.
Youneedtoensurethatthepageisrenderedtomeettherequirement.Whichlineofcodeshould
youuse?
A.
B.
C.
D.
document.getElementById(validate).style.display=inline;
document.getElementById(validate).style.margin=0;
document.getElementById(validate).style.padding=0;
document.getElementSyId(validate).style.display=block;
CorrectAnswer:A
QUESTION120
21HOTSPOTYouarecreatingawebworkerforanHTML5application.Thefollowingtasksmust
beperformedfromwithinthewebworker:
Registeraneventlistenerforthewebworker
StartandstopthewebworkerYouneedtodefineafunctionthatperformsthe
requiredtasks.
Whichcodesegmentshouldyouuse?(Toanswer,selecttheappropriateoptionfromthedrop
downlistintheanswerarea.)
HotArea:
CorrectAnswer:
QUESTION121
22YouarecreatingaJavaScriptfunctionthatdisplaysthenameofawebapplication.
Youdeclarethefollowingbuttonelement.<inputtype=buttonid=Aboutvalue=About/>
Whenauserclicksthebutton,aJavaScriptfunctionnamedAboutmustbecalled.
YouneedtocreateaneventhandlerthatcallstheAboutfunctionwhenthebuttonisclicked.
Whichtwocodesegmentscanyouuse?(Eachcorrectanswerpresentsacompletesolution.
Choosetwo.)
A.
B.
C.
D.
CorrectAnswer:CD
QUESTION122
23HOTSPOTYouarecreatingafunctionbyusingJavaScript.Thefunctionacceptsanobjectasthe
parameterandreturnsastringthatidentifiesthedatatypeoftheobject.
Youhavethefollowingrequirements:
ThefunctionmustreturnNumberiftheobjectisanumber.
ThefunctionmustreturnStringiftheobjectisastring.
ThefunctionmustreturnUnknowniftheobjectisneitheranumbernorastring.
Youneedtoimplementthefunctiontomeettherequirements.
Howshouldyoubuildthecodesegment?(Toanswer,selecttheappropriateoptionsfromthe
dropdownlistsintheanswerarea.)
HotArea:
CorrectAnswer:
QUESTION123
24YouneedtotestthevalueofthefollowingvariableinJavaScript.varlength=75;
Ablockofcodemustexecuteifthelengthequals75regardlessofthedatatype.
Youneedtousethestatementthatmeetsthisrequirement.
Whichlinesofcodeshouldyouuse?(Eachcorrectanswerpresentsacompletesolution.Choose
two.)
A.
B.
C.
D.
if(length===75)
if(length==75)
if(length!=75)
if(length==75)
CorrectAnswer:BD
QUESTION124
25YouaredevelopinganapplicationthatusesathirdpartyJavaScriptlibrarynameddoWork().
Thelibraryoccasionallythrowsanobjectisnullorundefinederrorwithanerrorcodeof
2146823281.Theapplicationmust:
ExtractandhandletheexceptionsthrownbydoWork()
Continuenormalprogramexecutionifotherexceptionsoccur
Youneedtoimplementtherequirements.
Whichcodesegmentshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:C
QUESTION125
26Youaretroubleshootingawebpagethatincludesthefollowingcode.(Linenumbersare
includedforreferenceonly.)
Whatisdisplayedinthealertfromline11?
A.
B.
C.
D.
Div
Function
Button
Document
CorrectAnswer:C
QUESTION126
27Youaredevelopingawebapplicationthatconsumesservicesfromathirdpartyapplication.
Awebworkerprocessesthethirdpartyapplicationrequestsinthebackground.
Apageintheapplicationinstantiatesthewebworkerprocess.
Youneedtoestablishtwowaycommunicationsbetweenthewebworkerprocessandthepage.
Whichtwoactionswillachievethisgoal?(Eachcorrectanswerpresentsacompletesolution.
Choosetwo.)
A.
B.
C.
D.
Fromthewebworker,usetheonconnecteventhandlerofthemainpagetocaptureevents.
Fromthemainpage,usetheonmessageeventhandlerofthewebworkertocaptureevents.
Fromthewebworker,usetheonmessageeventhandlerofthemainpagetocaptureevents.
Fromthemainpage,usetheonconnecteventhandlerofthewebworkertocaptureevents.
CorrectAnswer:BC
QUESTION127
28YouaredevelopinganHTML5webapplicationthatdisplayscustomermailingaddress
information.
TheapplicationloadsaddressesfromawebservicebyusingAJAX.
ThefollowingcodedefinesaCustomerobjectandloadsaddressdata.
YouneedtoimplementtheloadAddressfunction.Whichcodesegmentshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:C
QUESTION128
29YouaredevelopinganHTML5webpage.
Theappearanceofthetextboxmustchangewhenausermovesthefocustoanotherelementon
thepage.
Youneedtodevelopthepagetorespondtouseraction.Whichlineofcodeshouldyouuse?
A.
B.
C.
D.
<inputtype=textonblur=resetStyle(this);/>
<inputtype=textonfocus=resetStyle(this);/>
<inputtype=textonreset=resetStyle(this);/>
<inputtype=textonselect=resetStyle(this);/>
CorrectAnswer:A
QUESTION129
30DRAGDROPYouaredevelopinganonlineshoppingapplicationthatacceptscreditcardsfor
payment.Ifthecreditcardnumberisinvalid,theapplicationmust:
Generateanerror.Assign200totheerrornumber
AssignInvalidtotheerrordescriptionYouneedtowritethecodethatmeetsthe
requirements.
Howshouldyouwritethecode?(Toanswer,dragtheappropriatecodesegmentorsegmentsto
thecorrectlocationintheanswerarea.
Eachcodesegmentmaybeusedonce,morethanonce,ornotatall.Youmayneedtodragthe
splitbarbetweenpanesorscrolltoviewcontent.)
SelectandPlace:
CorrectAnswer:
QUESTION130
31YouaredevelopinganHTML5pagethatincludesseveralparagraphelements.Youhavethe
followingrequirements:
Addadropshadowthatisoneinchbelowthetextintheparagraph
Settheradiusofthedropshadowtofivepixels
Youneedtostyletheparagraphstomeettherequirements.
WhichCSSstyleshouldyouuse?
A.
B.
C.
D.
textshadow:72pt0pt5pt
textshadow:5pxlin0px;
textshadow:72pt5em0px
textshadow:72pt0em5px;
CorrectAnswer:B
QUESTION131
32Youarecreatingawebformthatuserswillusetoentertheirpersonalinformation.Theform
includesthefollowingHTML.
Youhavethefollowingrequirements:
Whenauserentersaninputbox,thecellontherightmustturngreen.
Whenauserleavesaninputbox,thecellontherightmustturnwhite.
Youneedtocreatethewebformtomeettheserequirements.
Whichcodesegmentshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:A
QUESTION132
33Youaredevelopingawebpage.YoucreateagridlayoutbyusingthefollowingCSSsegment.
Youhavethefollowingrequirements:
Youmustplacecontentinthefirstcolumnofthesecondrow.
Thecontentmustspantwocolumns.
Youneedtoensurethatthestyleofthegridmeetstherequirements.WhichCSSsegmentshould
youuse?
A.
B.
C.
D.
CorrectAnswer:A
QUESTION133
34DRAGDROPYouarecreatinganapplicationbyusingHTML5andCSS3.Thestylesforthepages
arederivedfromfivestylesheets.
Thestylesarenotbeingappliedcorrectlytothepagesintheapplication.
Youneedtoapplythestylesfromhighestprioritytolowestpriority.
Inwhichordershouldyouusethefivestylesheets?
(Toanswer,movethestylesheettypesfromthelistofstylesheettypestotheanswerareaand
arrangetheminthecorrectorder.)
SelectandPlace:
CorrectAnswer:
QUESTION134
35YouaredevelopingawebpagebyusingHTML5.Youhavethefollowingrequirements:
AnH1elementmustbeplacedatthetopleftcornerofthepage.
ThesizeandlocationoftheH1elementmustnotchangeifadditionalelementsare
addedtothepage.
YouneedtopositiontheH1elementonthepage.
WhichCS53styleshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:A
QUESTION135
36YouarestylingaboxobjectonapagebyusingCSS3.
Youneedtosetthetransparencyoftheobjectto50%.
WhichtwoC5S3styleswillachievethegoal?(Eachcorrectanswerpresentsacompletesolution.
Choosetwo.)
A.
B.
C.
D.
CorrectAnswer:BC
QUESTION136
37HOTSPOTYouaredevelopingawebpagethatwillbeaccessedfromvarioustypesofdevices.
Youhavethefollowingrequirements:
Theappropriatedisplayresolutionmustbeselecteddynamicallybasedonthedevice
connectingtothepage.
Mobiledeviceswithamaximumwidthof480pixelsmustbeabletousethepage.
Youneedtoensurethatthepagedisplayscorrectlyonanydevice.
Howshouldyoubuildthecode?(Toanswer,selecttheappropriateoptionsfromthedropdown
listsintheanswerarea.)
HotArea:
CorrectAnswer:
QUESTION137
38YouaredevelopinganHTML5webapplicationandarestylingtext.
YouneedtousethetexttransformCSSproperty.
Whichvaluesarevalidforthetexttransformproperty?
A.
B.
C.
D.
hidden
blink
capitalize
linethrough
CorrectAnswer:C
QUESTION138
39DRAGDROPYouaredevelopingawebsitethathasmanywebpageswithhyperlinkstoother
sites.
Youneedtoensurethatifahyperlinkcontainsanimage,thelinkedwebpageopensinanew
window.
WhichjQuerycodesegmentorsegmentsshouldyouuse?(Toanswer,dragtheappropriateline
ofcodetothecorrectlocation.
Eachlineofcodemaybeusedonce,morethanonce,ornotatall.
Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)
SelectandPlace:
CorrectAnswer:
QUESTION139
40Youaredevelopingapagethatincludestextandanillustration.
Thewebpageresemblesthefollowingimage.
Youhavethefollowingrequirements:
Theillustrationmustbeinthecenterofthepage.
Thetextmustflowaroundtheleft,right,top,andbottomoftheillustration.
Youneedtoensurethatthelayoutofthewebpagemeetstherequirements.Whichlineofcode
shouldyouuse?
A.
B.
C.
D.
mswrapside:both;
mswrapside:clear;
mswrapside:maximum;
mswrapside:auto;
CorrectAnswer:A
QUESTION140
41YouaredevelopingawebpagethathasagroupofHIandH2elements.
ThepagealsoincludesaCSSclassnamedunderlineMe.
Youhavethefollowingrequirements:
ThefontcolorofallH1andH2elementsmustbechangedtored.
TheCSSclassunderlineMemustbeappliedtoallH1andH2elements.
Youneedtoupdatethewebpagetomeettherequirements.
Whichcodesegmentshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:D
QUESTION141
42HOTSPOTYouaredevelopinganHTML5applicationforacompany.Youapplythefollowing
styletoaDIVelementonapage.
Whichillustrationshouldyousubmit?(Toanswer,selecttheappropriateillustrationintheanswer
area.)
HotArea:
CorrectAnswer:
QUESTION142
43DRAGDROPYouaredevelopingawebpagethatwillbeaccessedfromvarioustypesof
devices.
Youhavethefollowingrequirements:
Theappropriatedisplayresolutionmustbeselecteddynamicallybasedonthedevice
thatisconnectingtothepage.
Mobiledeviceswithamaximumwidthof480pixelsmustbeabletousethepage.
Youneedtoensurethatthepagedisplayscorrectlyonanydevice.
Howshouldyoubuildthecode?(Toanswer,dragtheappropriatemediastatementtothecorrect
location.Each
mediastatementmaybeusedonce,morethanonce,ornotatall.
Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)
SelectandPlace:
CorrectAnswer:
QUESTION143
44DRAGDROPYouaredevelopingawebpagebyusingHTML5andCSS3.
Hyperlinksonthepagemustberenderedwithastylethatreflectsthelastuseractionperformed.
Youneedtostylethefouranchorelementsinthedocument.Inwhatordershouldyouspecifythe
fouranchorselectors?
(Toanswer,movetheappropriateanchorselectorsfromthelistofCSScodestotheanswerarea
andarrangetheminthecorrectorder.)
SelectandPlace:
CorrectAnswer:
QUESTION144
45Youaredevelopingawebpagethatwillbedividedintothreeverticalsections.Themain
contentofthesitewillbeplacedinthecentersection.
Thetwooutersectionswillcontainadvertisements.Youhavethefollowingrequirements:
Themaincontentsectionmustbesettotwotimesthewidthoftheadvertising
sections.
ThelayoutmustbespecifiedbyusingtheCSS3flexibleboxmodel.
Youneedtoensurethatthevisuallayoutofthepagemeetstherequirements.WhichCSS3
propertyshouldyouuse?
A.
B.
C.
D.
boxorient
boxflexgroup
boxflex
boxdirection
CorrectAnswer:C
QUESTION145
46YouaredevelopinganHTML5page.Thepageincludesthefollowingcode.
Theinnerparagraphmustbeexactly15pixelsfromthetopleftcorneroftheouterparagraph.
Yousettheleftstylefortheinnerparagraphtotheappropriatevalue.
Youneedtosetthepositionpropertyoftheinnerparagraph.Whichvalueshouldyouuse?
A.
B.
C.
D.
absolute
static
fixed
relative
CorrectAnswer:A
QUESTION146
47YouaredevelopingacustomerwebformthatincludesthefollowingHTMLinputfield.<input
id=txtValue/>
Ifacustomerentersavalueintheinputfield,thenitmustbeanumericvalue.
Youneedtoaddvalidationtotheinputfield.
WhichHTMLshouldyouuse?
A.
B.
C.
D.
<inputid=txtValuetypetextpattern=/#/>
<inputid=txtValuetype=number/>
<inputid=txtValuetype=integer/>
<inputid=txtValuetype=textrequired=required/>
CorrectAnswer:B
QUESTION147
48YouaredevelopingacustomerwebformthatincludesthefollowingHTML.<input
id=txtValue/>YouneedtochangetheHTMLmarkupsothatcustomerscanenteronlyavalid
threelettercountrycode.WhichHTMLshouldyouuse?
A.
B.
C.
D.
<inputid=txtValuetype=code/>
<inputid=txtValuetype=textpattern=[AZaz]{3}/>
<inputid=txtValuetype=textrequired=required/>
<inputid=txtValuetype=country/>
CorrectAnswer:B
QUESTION148
49YouaredevelopingawebformthatincludesthefollowingHTML.<inputid=txtValue
type=text/>
YouneedtoensurethatavalueisenteredintotxtValuebeforetheformissubmitted.
Whichcodesegmentshouldyouuse?
A.
B.
C.
D.
CorrectAnswer:A
QUESTION149
50HOTSPOT
YouaredevelopingaformthatcapturesausersemailaddressbyusingHTML5andjQuery.
Theformmustcapturetheemailaddressandreturnitasaquerystringparameter.
Thequerystringparametermustdisplaythe@symbolusedintheemailaddress.
Youneedtoimplementthisfunctionality.Howshouldyoudeveloptheform?(Toanswer,select
theappropriateoptionsfromthedropdownlistsintheanswerarea.)
HotArea:
CorrectAnswer:
QUESTION150
51YouaredevelopingawebpagethatconsumesaWindowsCommunicationFoundation(WCF)
service.
Thepageincludesthefollowingcodesegment.varxhr=newXMLHttpRequest();
ThepageusesthexhrHandler()methodtolistenforchangestotherequeststatusoftheWCF
servicecalls.
ItusesthexmlToJavaScript()methodtoconverttheresponsefromtheWCFservicetoa
JavaScriptobject.
ThexhrHandler()methodmustbecalledautomaticallyeachtimetherequeststatuschanges.
Youneedtoaddtheeventhandlertotherequestobject.Whichlineofcodeshouldyouuse?
A.
B.
C.
D.
xhr.onCallback=xhrHandler;
xhr.onreadystatechange=xhrHandler;
xhr.readyState=xhrHandler;
xhr.status=xhrHandler;
CorrectAnswer:B
QUESTION151
Youaremodifyinganapplicationthatprocessesloans.ThefollowingcodedefinestheLoanclass.
(Linenumbersareincludedforreferenceonly.)
Loansarerestrictedtoamaximumtermof10years.Theapplicationmustsendanotification
messageifaloanrequestexceeds10years.
Youneedtoimplementthenotificationmechanism.
Whichtwoactionsshouldyouperform?(Eachcorrectanswerpresentspartofthesolution.
Choosetwo.)
CorrectAnswer:BD
Explanation:
B:Raisetheevent.
D:Declaretheeventhandler.
QUESTION152
Anapplicationcontainscodethatmeasuresreactiontimes.Thecoderunsthetimeronathread
separatefromtheuserinterface.Theapplicationincludesthefollowingcode.(Linenumbersare
includedforreferenceonly.)
YouneedtoensurethattheapplicationcancelsthetimerwhentheuserpressestheEnterkey.
Whichcodesegmentshouldyouinsertatline14?
A. tokenSource.Token.Register(()=> tokenSource.Cancel() );
B. tokenSource.Cancel();
C. tokenSource.IsCancellationRequested = true;
D. tokenSource.Dispose();
CorrectAnswer:B
QUESTION153
Youaredevelopinganapplicationthatgeneratescode.Theapplicationincludesthefollowing
codesegment.(Linenumbersareincludedforreferenceonly.)
YouneedtoensurethatcodegeneratedbytheGenerateCode()methodrepresentsaclassthat
canbeaccessedbyallobjectsinitsapplicationdomain.
Whichtwocodesegmentscanyouinsertatline05toachievethisgoal?(Eachcorrectanswer
presentsacompletesolution.Choosetwo.)
CorrectAnswer:AC
QUESTION154
Youaredevelopinganapplicationthatwillprocesspersonnelrecords.Theapplicationmust
encrypthighlysensitivedata.Youneedtoensurethattheapplicationusesthestrongestavailable
encryption.Whichclassshouldyouuse?
A. System.Security.Cryptography.DES
B. System.Security.Cryptography.Aes
C. System.Security.Cryptography.TripleDES
D. System.Security.Cryptography.RC2
CorrectAnswer:B
QUESTION155
Youaredevelopinganapplicationthatusesa.configfile.
Therelevantportionofthe.configfileisshownasfollows:
Youneedtoensurethatdiagnosticdatafortheapplicationwritestotheeventlogbyusingthe
configurationspecifiedinthe.configfile.Whatshouldyouincludeintheapplicationcode?
CorrectAnswer:A
QUESTION156
YouaredevelopinganapplicationthatincludesaclassnamedEmployeeandagenericlistof
employees.Thefollowingcodesegmentdeclaresthelistofemployees:
List<Employee>employeesList=newList<Employee>();
YoupopulatetheemployeesListobjectwithseveralhundredEmployeeobjects.
TheapplicationmustdisplaythedataforfiveEmployeeobjectsatatime.
YouneedtocreateamethodthatwillreturnthecorrectnumberofEmployeeobjects.
Whichcodesegmentshouldyouuse?
CorrectAnswer:B
QUESTION157
DRAGDROP
YoucreateanassemblynamedAssembly1.dll.YouneedtoensurethatAssembly1.dllcanbe
deployedtotheglobalassemblycache(GAC).Whichcommandsshouldyourun?(Toanswer,drag
theappropriateprogramstothecorrectlocations.Eachprogrammaybeusedonce,morethan
once,ornotatall.Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)
CorrectAnswer:
QUESTION158
DRAGDROP
YouhaveanapplicationthataccessesaMicrosoftSQLServerdatabase.
ThedatabasecontainsastoredprocedurenamedProc1.Proclaccessesseveralrowsofdata
acrossmultipletables.
YouneedtoensurethatafterProc1executes,thedatabaseisleftinaconsistentstate.While
Proc1executes,nootheroperationcanmodifydataalreadyreadorchangedbyProc1.(Develop
thesolutionbyselectingandorderingtherequiredcodesnippets.Youmaynotneedallofthe
codesnippets.)
CorrectAnswer:
QUESTION159
DRAGDROP
Youhaveanapplicationthatusespaging.Eachpagedisplays10itemsfromalist.
Youneedtodisplaythethirdpage.(Developthesolutionbyselectingandorderingtherequired
codesnippets.Youmaynotneedallofthecodesnippets.)
CorrectAnswer:
QUESTION160
DRAGDROP
YouhaveamethodthatwillevaluateaparameteroftypeInt32namedStatus.
Youneedtoensurethatthemethodmeetsthefollowingrequirements:
IfStatusissettoActive,themethodmustreturn1.
IfStatusissettoInactive,themethodmustreturn0.
IfStatusisanyothervalue,themethodmustreturn1.
Whatshouldyoudo?(Toanswer,dragtheappropriatestatementtothecorrectlocationinthe
answerarea.Eachstatementmaybeusedonce,morethanonce,ornotatall.Youmayneedto
dragthesplitbarbetweenpanesorscrolltoviewcontent.)
CorrectAnswer:
QUESTION161
Youaredevelopinganapplicationthatusesmultipleasynchronoustaskstooptimize
performance.Youneedtoretrievetheresultofanasynchronoustask.Whichcodesegment
shouldyouuse?
CorrectAnswer:C
QUESTION162
Youaredevelopinganapplication.
Theapplicationcontainsthefollowingcode:
Whenyoucompilethecode,youreceivethefollowingsyntaxerrormessage:Apreviouscatch
clausealreadycatchesallexceptionsofthisorasupertype(System.Exception).
Youneedtoensurethatthecodecanbecompiled.Whatshouldyoudo?
CorrectAnswer:A
QUESTION163
YouaredevelopinganapplicationthatincludesamethodnamedSendMessage.
YouneedtoensurethattheSendMessage()methodiscalledwiththerequiredparameters.
Whichtwocodesegmentscanyouusetoachievethisgoal?(Eachcorrectanswerpresentsa
completesolution.Choosetwo.)
CorrectAnswer:CD
Explanation:
D:ExpandoObject
Representsanobjectwhosememberscanbedynamicallyaddedandremovedatruntime./The
ExpandoObjectclassenablesyoutoaddanddeletemembersofitsinstancesatruntimeandalso
tosetandgetvaluesofthesemembers.Thisclasssupportsdynamicbinding,whichenablesyou
tousestandardsyntaxlikesampleObject.sampleMemberinsteadofmorecomplexsyntaxlike
sampleObject.GetAttribute(sampleMember)./YoucanpassinstancesoftheExpandoObject
classasparameters.NotethattheseinstancesaretreatedasdynamicobjectsinC#andlate
boundobjectsinVisualBasic.ThismeansthatyoudonothaveIntelliSenseforobjectmembers
andyoudonotreceivecompilererrorswhenyoucallnonexistentmembers.Ifyoucallamember
thatdoesnotexist,anexceptionoccurs.
Note:
*VisualC#2010introducesanewtype,dynamic.Thetypeisastatictype,butanobjectoftype
dynamicbypassesstatictypechecking.Inmostcases,itfunctionslikeithastypeobject.At
compiletime,anelementthatistypedasdynamicisassumedtosupportanyoperation.
Therefore,youdonothavetobeconcernedaboutwhethertheobjectgetsitsvaluefromaCOM
API,fromadynamiclanguagesuchasIronPython,fromtheHTMLDocumentObjectModel
(DOM),fromreflection,orfromsomewhereelseintheprogram.However,ifthecodeisnotvalid,
errorsarecaughtatruntime.
QUESTION164
YouhaveanapplicationthataccessesaWebservernamedServer1.Youneedtodownloadan
imagenamedImagel.jpgfromServer1andstoretheimagelocallyasFilel.jpg.Whichcodeshould
youuse?
CorrectAnswer:C
QUESTION165
YouaredevelopingaC#application.TheapplicationreferencesandcallsaRESTfulwebservice
namedEmployeeService.TheEmployeeServicewebserviceincludesamethodnamed
GetEmployee,whichacceptsanemployeeIDasaparameter.Thewebservicereturnsthe
followingJSONdatafromthemethod.
{Id:1,Name:DavidJones>
Thefollowingcodesegmentinvokestheserviceandstorestheresult:
YouneedtoconvertthereturnedJSONdatatoanEmployeeobjectforuseintheapplication.
Whichcodesegmentshouldyouuse?
CorrectAnswer:C
QUESTION166
Youaredevelopinganassembly.Youplantosigntheassemblywhentheassemblyisdeveloped.
Youneedtoreservespaceintheassemblyforthesignature.Whatshouldyoudo?
CorrectAnswer:D
QUESTION167
Youhavethefollowingcode(linenumbersareincludedforreferenceonly):
Youneedtoensurethatifanexceptionoccurs,theexceptionwillbelogged.
Whichcodeshouldyouinsertatline28?
CorrectAnswer:A
Explanation:
*XmlWriterTraceListener
DirectstracingordebuggingoutputasXMLencodeddatatoaTextWriterortoaStream,suchas
aFileStream.
QUESTION168
YouaretroubleshootinganapplicationthatusesaclassnamedFullName.Theclassisdecorated
withtheDataContractAttributeattribute.Theapplicationincludesthefollowingcode.(Line
numbersareincludedforreferenceonly.)
YouneedtoensurethattheentireFullNameobjectisserializedtothememorystreamobject.
Whichcodesegmentshouldyouinsertatline09?
A. binary.WriteEndElement();
B. binary.NriteEndDocument();
C. ms.Close();
D. binary.Flush();
CorrectAnswer:A
Explanation:
*DataContractSerializer.WriteEndObjectMethod(XmlDictionaryWriter)WritestheclosingXML
elementusinganXmlDictionaryWriter.
*Noteonline07:DataContractSerializer.WriteObjectMethodWritesalltheobjectdata(starting
XMLelement,content,andclosingelement)toanXMLdocumentorstream.
XmlDictionaryWriter
QUESTION169
Youwritethefollowingmethod(linenumbersareincludedforreferenceonly):
YouneedtoensurethatthemethodextractsalistofURLsthatmatchthefollowingpattern:
@http://(www.)?([^.]+).com;
Whichcodeshouldyouinsertatline07?
CorrectAnswer:A
Explanation:
*MatchCollection
Representsthesetofsuccessfulmatchesfoundbyiterativelyapplyingaregularexpression
patterntotheinputstring.
Thecollectionisimmutable(readonly)andhasnopublicconstructor.TheRegex.Matches
methodreturnsaMatchCollectionobject.
*List<T>.AddMethod
AddsanobjecttotheendoftheList<T>.
Incorrect:
NotD:ICollection.SyncRootProperty
Forcollectionswhoseunderlyingstoreisnotpubliclyavailable,theexpectedimplementationisto
returnthecurrentinstance.Notethatthepointertothecurrentinstancemightnotbesufficient
forcollectionsthatwrapothercollections;thoseshouldreturntheunderlyingcollections
SyncRootproperty.
QUESTION170
Youhavethefollowingcode:
Youneedtoretrieveallofthenumbersfromtheitemsvariablethataregreaterthan80.
Whichcodeshouldyouuse?
CorrectAnswer:B
Explanation:
Enumerable.Where<TSource>Method(IEnumerable<TSource>,Func<TSource,Boolean>)
Filtersasequenceofvaluesbasedonapredicate.
Example:
List<string>fruits=
newList<string>{apple,passionfruit,banana,mango,orange,blueberry,grape,
strawberry};
IEnumerable<string>query=fruits.Where(fruit=>fruit.Length<6);
foreach(stringfruitinquery)
{
Console.WriteLine(fruit);
}
/*
Thiscodeproducesthefollowingoutput:
apple
mango
grape
*/
QUESTION171
Youaredevelopinganapplicationthatusesseveralobjects.Theapplicationincludesthefollowing
codesegment.(Linenumbersareincludedforreferenceonly.)
Youneedtoevaluatewhetheranobjectisnull.
Whichcodesegmentshouldyouinsertatline03?
A. OptionA
B. OptionB
C. OptionC
D. OptionD
CorrectAnswer:B
Explanation:
Usethe==operatortocomparevaluesandinthiscasealsousethenullliteral.
QUESTION172
YouareimplementinganewmethodnamedProcessData.TheProcessData()methodcallsathird
partycomponentthatperformsalongrunningoperationtoretrievestockinformationfroma
webservice.
ThethirdpartycomponentusestheIAsyncResultpatterntosignalcompletionofthelong
runningoperationsothattheUIcanbeupdatedwiththenewvalues.
Youneedtoensurethatthecallingcodehandlesthelongrunningoperationasa
System.Threading.Tasks.TaskobjecttoavoidblockingtheUIthread.
Whichtwoactionsshouldyouperform?(Eachcorrectanswerpresentspartofthesolution.
Choosetwo.)
A. CreateaTaskCompletionSource<T> object.
B. Callthecomponent byusingtheTaskFactory.FromAsync() method.
Applythefollowing attributetothe ProcessData() method signature:
C. [Methodlmpl(MethodlmplOptions.Synchronized)]
D. ApplytheasyncmodifiertotheProcessData() method signature.
CorrectAnswer:AB
Explanation:
A:Inmanyscenarios,itisusefultoenableaTask<TResult>torepresentanexternalasynchronous
operation.TaskCompletionSource<TResult>isprovidedforthispurpose.Itenablesthecreationof
ataskthatcanbehandedouttoconsumers,andthoseconsumerscanusethemembersofthe
taskastheywouldanyother.However,unlikemosttasks,thestateofataskcreatedbya
TaskCompletionSourceiscontrolledexplicitlybythemethodsonTaskCompletionSource.This
enablesthecompletionoftheexternalasynchronousoperationtobepropagatedtothe
underlyingTask.Theseparationalsoensuresthatconsumersarenotabletotransitionthestate
withoutaccesstothecorrespondingTaskCompletionSource.
B:TaskFactory.FromAsyncMethod
CreatesaTaskthatrepresentsapairofbeginandendmethodsthatconformtothe
AsynchronousProgrammingModelpattern.Overloaded.
Example:
TaskFactory.FromAsyncMethod(IAsyncResult,Action<IAsyncResult>)CreatesaTaskthat
executesanendmethodactionwhenaspecifiedIAsyncResultcompletes.
Note:
*System.Threading.Tasks.Task
Representsanasynchronousoperation.
QUESTION173
YouaredevelopingaclassnamedAccountthatwillbeusedbyseveralapplications.The
applicationsthatwillconsumetheAccountclasswillmakeasynchronouscallstotheAccountclass
toexecuteseveraldifferentmethods.Youneedtoensurethatonlyonecalltothemethodsis
executedatatime.Whichkeywordshouldyouuse?
A. sealed
B. protected
C. checked
D. lock
CorrectAnswer:D
QUESTION174
YouaredevelopinganapplicationbyusingC#.Theapplicationwillwriteeventstoaneventlog.
Youplantodeploytheapplicationtoaserver.YoucreateaneventsourcenamedMySourceanda
customlognamedMyLogontheserver.Youneedtowriteeventstothecustomlog.Whichcode
segmentshouldyouuse?
CorrectAnswer:D
QUESTION175
YouplantostorepasswordsinaWindowsAzureSQLDatabasedatabase.Youneedtoensurethat
thepasswordsarestoredinthedatabasebyusingahashalgorithm.Whichcryptographic
algorithmshouldyouuse?
A. ECDSA
B. RSA768
C. AES256
D. SHA256
CorrectAnswer:D
QUESTION176
HOTSPOT
Youhaveanexistingorderprocessingsystemthataccepts.xmlfiles.
ThefollowingcodeshowsanexampleofaproperlyformattedorderinXML:
Youcreatethefollowingclassthatwillbeserialized:
Foreachofthefollowingproperties,selectYesifthepropertyisserializedaccordingtothe
definedschema.Otherwise,selectNo.
CorrectAnswer:
QUESTION177
YouaredevelopinganapplicationthatincludesmethodsnamedConvertAmountand
TransferFunds.
Youneedtoensurethattheprecisionandrangeofthevalueintheamountvariableisnotlost
whentheTransferFunds()methodiscalled.
Whichcodesegmentshouldyouuse?
CorrectAnswer:C
Explanation:
SimplyusefloatfortheTransferFundsparameter.
Note:
*Thefloatkeywordsignifiesasimpletypethatstores32bitfloatingpointvalues.
*Thedoublekeywordsignifiesasimpletypethatstores64bitfloatingpointvalues
QUESTION178
Youneedtowriteaconsoleapplicationthatmeetsthefollowingrequirements:
IftheapplicationiscompiledinDebugmode,theconsoleoutputmustdisplayEnteringdebug
mode.
IftheapplicationiscompiledinReleasemode,theconsoleoutputmustdisplayEnteringrelease
mode.
Whichcodeshouldyouuse?
A. OptionA
B. OptionB
C. OptionC
D. OptionD
CorrectAnswer:B
Explanation:
WhentheC#compilerencountersan#ifdirective,followedeventuallybyan#endifdirective,it
willcompilethecodebetweenthedirectivesonlyifthespecifiedsymbolisdefined.UnlikeCand
C++,youcannotassignanumericvaluetoasymbol;the#ifstatementinC#isBooleanandonly
testswhetherthesymbolhasbeendefinedornot.Forexample,
#defineDEBUG
//
#ifDEBUG
Console.WriteLine(Debugversion);
#endif
QUESTION179
DRAGDROP
Youareaddingamethodtoanexistingapplication.Themethodusesanintegernamed
statusCodeasaninputparameterandreturnsthestatuscodeasastring.
Themethodmustmeetthefollowingrequirements:
ReturnErrorifthestatusCodeis0.
ReturnSuccessifthestatusCodeis1.
ReturnUnauthorizedifthestatusCodeisanyvalueotherthan0or1.
Youneedtoimplementthemethodtomeettherequirements.
Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriatestatementstothe
correctlocationsintheanswerarea.Eachstatementmaybeusedonce,morethanonce,ornot
atall.Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)
CorrectAnswer:
QUESTION180
Youhavethefollowingclass(linenumbersareincludedforreferenceonly):
ServiceProxyisaproxyforawebservice.CallstotheUpdatemethodcantakeuptofiveseconds.
TheTestclassistheonlyclasstheusesClass1.
YouruntheExecutemethodthreetimes,andyoureceivethefollowingresults:
213
312
231
YouneedtoensurethateachvalueisappendedtotheValuepropertyintheorderthatthe
Modifymethodsareinvoked.
Whatshouldyoudo?
CorrectAnswer:B
QUESTION181
YouaredevelopingamethodnamedGetHashthatwillreturnahashvalueforafile.Themethod
includesthefollowingcode.(Linenumbersareincludedforreferenceonly.)
YouneedtoreturnthecryptographichashofthebytescontainedinthefileBytesvariable.
Whichcodesegmentshouldyouinsertatline05?
CorrectAnswer:A
QUESTION182
Youaredevelopinganapplicationthatincludesthefollowingcodesegment:
YouneedtoimplementtheOpen()methodofeachinterfaceinaderivedclassnamed
UseResourcesandcalltheOpen()methodofeachinterface.
Whichtwocodesegmentsshouldyouuse?(Eachcorrectanswerpresentspartofthesolution.
Choosetwo.)
CorrectAnswer:AC
Explanation:
*Aninterfacecontainsonlythesignaturesofmethods,properties,eventsorindexers.Aclassor
structthatimplementstheinterfacemustimplementthemembersoftheinterfacethatare
specifiedintheinterfacedefinition.
*Example:
interfaceISampleInterface
{
voidSampleMethod();
classImplementationClass:ISampleInterface
{
//Explicitinterfacememberimplementation:
voidISampleInterface.SampleMethod()
{
//Methodimplementation.
}
staticvoidMain()
{
//Declareaninterfaceinstance.
ISampleInterfaceobj=newImplementationClass();
//Callthemember.
obj.SampleMethod();
}
}
QUESTION183
YouareimplementingamethodnamedProcessDatathatperformsalongrunningtask.The
ProcessData()methodhasthefollowingmethodsignature:
publicvoidProcessData(List<decimal>values,CancellationTokenSourcesource,
CancellationTokentoken)
Ifthecallingcoderequestscancellation,themethodmustperformthefollowingactions:
Cancelthelongrunningtask.
SetthetaskstatustoTaskStatus.Canceled.
YouneedtoensurethattheProcessData()methodperformstherequiredactions.
Whichcodesegmentshouldyouuseinthemethodbody?
if(token.IsCancellationRequested)
A. return;
B. thrownewAggregateException();
C. token.ThrowIfCancellationRequested();
D. source.Cancel();
CorrectAnswer:C
QUESTION184
HOTSPOT
Youhavethefollowingcode(linenumbersareincludedforreferenceonly):
Toanswer,completeeachstatementaccordingtotheinformationpresentedinthecode.
CorrectAnswer:
QUESTION185
YouaredevelopinganapplicationinC#.
Theapplicationusesexceptionhandlingonamethodthatisusedtoexecutemathematical
calculationsbyusingintegernumbers.
Youwritethefollowingcatchblocksforthemethod(linenumbersareincludedforreference
only):
Youneedtoaddthefollowingcodetothemethod:
Atwhichlineshouldyouinsertthecode?
A. 01
B. 03
C. 05
D. 07
CorrectAnswer:A
QUESTION186
Youaredevelopinganapplicationthatusesmultipleasynchronoustaskstooptimize
performance.Theapplicationwillbedeployedinadistributedenvironment.Youneedtoretrieve
theresultofanasynchronoustaskthatretrievesdatafromawebservice.Thedatawilllaterbe
parsedbyaseparatetask.Whichcodesegmentshouldyouuse?
CorrectAnswer:B
QUESTION187
YouareimplementingamethodnamedGetValidPhoneNumbers.TheGetValidPhoneNumbers()
methodprocessesalistofstringvaluesthatrepresentphonenumbers.
TheGetValidPhoneNumbers()methodmustreturnonlyphonenumbersthatareinavalidformat.
YouneedtoimplementtheGetValidPhoneNumbers()method.
Whichtwocodesegmentscanyouusetoachievethisgoal?(Eachcorrectanswerpresentsa
completesolution.Choosetwo.)
CorrectAnswer:AB
Explanation:
*Regex.Matches
Searchesaninputstringforalloccurrencesofaregularexpressionandreturnsallthematches.
*MatchCollection
Representsthesetofsuccessfulmatchesfoundbyiterativelyapplyingaregularexpression
patterntotheinputstring.
Thecollectionisimmutable(readonly)andhasnopublicconstructor.TheRegex.Matches
methodreturnsaMatchCollectionobject.
*List<T>.AddMethod
AddsanobjecttotheendoftheList<T>.
QUESTION188
DRAGDROP
Youaredevelopinganapplicationthatwillwritedatatoafile.Theapplicationincludesthe
followingcodesegment.(Linenumbersareincludedforreferenceonly.)
YouneedtoensurethattheWriteData()methodwillwritedatatoafile.
Whichfourcodesegmentsshouldyouinsertinsequenceatline03?(Toanswer,movethe
appropriatecodesegmentsfromthelistofcodesegmentstotheanswerareaandarrangethem
inthecorrectorder.)
CorrectAnswer:
QUESTION189
Youneedtocreateamethodthatcanbecalledbyusingavaryingnumberofparameters.What
shouldyouuse?
A. derivedclasses
B. interface
C. enumeration
D. methodoverloading
CorrectAnswer:D
Explanation:
Memberoverloadingmeanscreatingtwoormoremembersonthesametypethatdifferonlyin
thenumberortypeofparametersbuthavethesamename.Overloadingisoneofthemost
importanttechniquesforimprovingusability,productivity,andreadabilityofreusablelibraries.
Overloadingonthenumberofparametersmakesitpossibletoprovidesimplerversionsof
constructorsandmethods.Overloadingontheparametertypemakesitpossibletousethesame
membernameformembersperformingidenticaloperationsonaselectedsetofdifferenttypes.
QUESTION190
Youarecreatinganapplicationthatreadsfromadatabase.Youneedtousedifferentdatabases
duringthedevelopmentphaseandthetestingphasebyusingconditionalcompilationtechniques.
Whatshouldyoudo?
A. ConfiguretheDefineTRACEconstant setting in Microsoft Visual Studio.
B. Decoratethecode byusingthe[DebuggerDisplay(Mydebug)] attribute.
C. ConfiguretheDefineDEBUGconstant setting in Microsoft Visual Studio.
D. Disablethestrongnamebypassfeature of Microsoft .NET Framework intheregistry.
CorrectAnswer:C
Explanation:
Useonedebugversiontoconnecttothedevelopmentdatabase,andastandardversionto
connecttothelivedatabase.
QUESTION191
YouarecreatingaclassnamedLoan.
TheLoanclassmustmeetthefollowingrequirements:
IncludeamemberthatrepresentstherateforaLoaninstance.
Allowexternalcodetoassignavaluetotheratemember.
Restricttherangeofvaluesthatcanbeassignedtotheratemember.
Youneedtoimplementtheratemembertomeettherequirements.
Inwhichformshouldyouimplementtheratemember?
A. publicstaticproperty
B. publicproperty
C. publicstaticfield
D. protectedfield
CorrectAnswer:B
QUESTION192
Youarecreatingaclasslibrarythatwillbeusedinawebapplication.Youneedtoensurethatthe
classlibraryassemblyisstronglynamed.Whatshouldyoudo?
CorrectAnswer:B
Explanation:
TheWindowsSoftwareDevelopmentKit(SDK)providesseveralwaystosignanassemblywitha
strongname:
*UsingtheAssemblyLinker(Al.exe)providedbytheWindowsSDK.
*Usingassemblyattributestoinsertthestrongnameinformationinyourcode.Youcanuse
eithertheAssemblyKeyFileAttributeortheAssemblyKeyNameAttribute,dependingonwherethe
keyfiletobeusedislocated.
*Usingcompileroptionssuch/keyfileor/delaysigninC#andVisualBasic,orthe/KEYFILEor
/DELAYSIGNlinkeroptioninC++.(Forinformationondelaysigning,seeDelaySigningan
Assembly.)
Note:
*Astrongnameconsistsoftheassemblysidentityitssimpletextname,versionnumber,and
cultureinformation(ifprovided)plusapublickeyandadigitalsignature.Itisgeneratedfroman
assemblyfile(thefilethatcontainstheassemblymanifest,whichinturncontainsthenamesand
hashesofallthefilesthatmakeuptheassembly),usingthecorrespondingprivatekey.
Microsoft?VisualStudio?.NETandotherdevelopmenttoolsprovidedinthe.NETFrameworkSDK
canassignstrongnamestoanassembly.Assemblieswiththesamestrongnameareexpectedto
beidentical.
QUESTION193
YouarecreatingaconsoleapplicationnamedApp1.
App1retrievesdatafromtheInternetbyusingJavaScriptObjectNotation(JSON).
Youaredevelopingthefollowingcodesegment(linenumbersareincludedforreferenceonly):
YouneedtoensurethatthecodevalidatestheJSONstring.
Whichcodeshouldyouinsertatline03?
CorrectAnswer:D
Explanation:
TheJavaScriptSerializerClassProvidesserializationanddeserializationfunctionalityforAJAX
enabledapplications.
TheJavaScriptSerializerclassisusedinternallybytheasynchronouscommunicationlayerto
serializeanddeserializethedatathatispassedbetweenthebrowserandtheWebserver.You
cannotaccessthatinstanceoftheserializer.However,thisclassexposesapublicAPI.Therefore,
youcanusetheclasswhenyouwanttoworkwithJavaScriptObjectNotation(JSON)inmanaged
code.
QUESTION194
YouaredevelopinganapplicationthatincludesmethodsnamedEvaluateLoan,ProcessLoan,and
FundLoan.TheapplicationdefinesbuildconfigurationsnamedTRIAL,BASIC,andADVANCED.
Youhavethefollowingrequirements:
TheTRIALbuildconfigurationmustrunonlytheEvaluateLoan()method.
TheBASICbuildconfigurationmustrunallthreemethods.
TheADVANCEDbuildconfigurationmustrunonlytheEvaluateLoan()andProcessLoan()
methods.
Youneedtomeettherequirements.Whichcodesegmentshouldyouuse?
CorrectAnswer:C
QUESTION195
Youarecreatinganapplicationthatprocessesalistofnumbers.
Theapplicationmustdefineamethodthatqueriesthelistanddisplaysasubsetofthenumbers
totheuser.Themethodmustnotupdatethelist.
YouneedtocreateanextendablequerybyusingLINQ.
Whatshouldyoudo?
CorrectAnswer:C
QUESTION196
Youaredevelopinganapplicationthatwillbedeployedtomultiplecomputers.Yousetthe
assemblyname.Youneedtocreateauniqueidentityfortheapplicationassembly.Whichtwo
assemblyidentityattributesshouldyouincludeinthesourcecode?(Eachcorrectanswerpresents
partofthesolution.Choosetwo.)
A. AssemblyDelaySignAttribute
B. AssemblyCompanyAttribute
C. AssemblyProductAttribute
D. AssemblyCultureAttribute
E. AssemblyVersionAttribute
CorrectAnswer:DE
Explanation:
TheAssemblyNameobjectcontainsinformationaboutanassembly,whichyoucanusetobindto
thatassembly.Anassemblysidentityconsistsofthefollowing:
Simplename.
Versionnumber.
Cryptographickeypair.
Supportedculture.
D:AssemblyCultureAttribute
Specifieswhichculturetheassemblysupports.
Theattributeisusedbycompilerstodistinguishbetweenamainassemblyandasatellite
assembly.Amainassemblycontainscodeandtheneutralculturesresources.Asatelliteassembly
containsonlyresourcesforaparticularculture,asin[assembly:AssemblyCultureAttribute(de)]
E:AssemblyVersionAttribute
Specifiestheversionoftheassemblybeingattributed.Theassemblyversionnumberispartofan
assemblysidentityandplaysakeypartinbindingtotheassemblyandinversionpolicy.
QUESTION197
YouaredevelopinganapplicationthatcontainsaclassnamedTheaterCustomerandamethod
namedProcessTheaterCustomer.TheProcessTheaterCustomer()methodacceptsa
TheaterCustomerobjectastheinputparameter.
Youhavethefollowingrequirements:
StoretheTheaterCustomerobjectsinacollection.
EnsurethattheProcessTheaterCustomer()methodprocessestheTheaterCustomerobjectsin
theorderinwhichtheyareplacedintothecollection.
Youneedtomeettherequirements.
Whatshouldyoudo?
CorrectAnswer:B
QUESTION198
Youaredebugginga64bitC#application.UsersreportSystem.OutOfMemoryException
exceptions.Thesystemisattemptingtousearrayslargerthan2GBinsize.Youneedtoensure
thattheapplicationcanusearrayslargerthan2GB.Whatshouldyoudo?
CorrectAnswer:C
QUESTION199
YoudevelopanapplicationbyusingC#.Theapplicationcountsthenumberoftimesaspecific
wordappearswithinasetoftextfiles.Theapplicationincludesthefollowingcode.
(Linenumbersareincludedforreferenceonly.)
Youhavethefollowingrequirements:
Populatethe_wordCountsobjectwithalistofwordsandthenumberofoccurrencesofeach
word.
EnsurethatupdatestotheConcurrentDictionaryobjectcanhappeninparallel.
Youneedtocompletetherelevantcode.
Whichcodesegmentshouldyouinsertatline23?
CorrectAnswer:A
QUESTION200
Youareevaluatingamethodthatcalculatesloaninterest.Theapplicationincludesthefollowing
codesegment.(Linenumbersareincludedforreferenceonly.)
WhentheloanTermvalueis5andtheloanAmountvalueis4500,theloanRatemustbesetto6.5
percent.YouneedtoadjusttheloanRatevaluetomeettherequirements.
Whatshouldyoudo?
CorrectAnswer:A