Multiple Choice Questions
51. Which language is not a true object-oriented programming language? a.) VB.NET b.) VB c.) !"" d.) !# e.) $a%a Answer: b Section: 6-1 5&. ' ()*+ a.) uses buttons, menus, and icons. b.) should be eas- .or a user to manipulate. c.) stands .or (raphic )se *nteraction. d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 6-1 5/. Visual 0tudio .NET pro%ides 1hich .eature+ a.) debugging. b.) application deplo-ment. c.) s-nta2 chec3ing. d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 6-2 54. What does *5E stand .or? a.) *ntegrated 5e%elopment En%ironment b.) *ntegrated 5esign En%ironment c.) *nterior 5e%elopment En%ironment d.) *nterior 5esign En%ironment e.) None o. the abo%e. Answer: a Section: 6-2 55. Level: Moderate Page: 107 Level: Easy Page: 107 Level: Moderate Page: 106 Level: Easy Page: 107
Which t-pe o. project can a de%eloper choose in the Ne1 6roject dialog bo2? a.) Visual Basic 6rojects b.) Visual !# 6rojects c.) Visual !"" 6rojects d.) Both a and b. e.) 'll o. the abo%e.
Answer: e Section: 6-2 5 .
Level: Easy Page: 108
Which is not a main component o. the Visual 0tudio *5E? a.) 0olution E2plorer b.) Tool Bo2 c.) 0tart 7enu d.) 5esigner Windo1 e.) 6roperties Windo1 Answer: c Section: 6-2 Level: Easy Page: 110
58.
Which does the solution e2plorer not displa-? a.) 9orm 6roperties b.) :e.erence 9older c.) 9orm 9ile d.) 'ssemble 9ile e.) 'll are part o. the solution e2plorer. Answer: a Section: 6-2 Level: Easy Page: 111
5;.
Which is true about the name and te2t propert- o. a control? a.) The- are the same 1hen the control is .irst created. b.) The te2t propert- changes to match an- changes in the name propert-. c.) The name propert- changes to match an- changes in the te2t propert-. d.) The- are ne%er the same unless the programmer ma3es it that 1a-. e.) The- are not allo1ed to be the same and an error 1ill occur i. the- are. Answer: a Section: 6-3 Level: Hard Page: 113
5<.
9or 1hich tas3 does the *5E pro%ide multiple 1a-s to accomplish the tas3? a.) 6utting a control on the .orm b.) :unning the program c.) 'cti%ating the propert- 1indo1 .or a control d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 6-3 Level: Moderate Page: 111
=.
Which are the standard pre.i2es .or the Button and !ombo bo2 controls respecti%el-? a.) btn and chb b.) btn and cbo c.) bto and chb d.) bto and cbo e.) cmd and cbo
Answer: b Section: 6-3 1.
Level: Moderate Page: 113
Which are the standard pre.i2es .or the te2t bo2 and label controls respecti%el-? a.) te2 and lbl b.) te2 and lab c.) t2b and lbl d.) t2b and lab e.) t2t and lab Answer: c Section: 6-3 Level: Moderate Page: 113
&.
Which tas3 is accomplished in the !ode editor? a.) 'dding .orms to the project b.) 'dding controls to the .orm c.) 'dding e%ent procedures to the .orm d.) Both a and b. e.) 'll o. the abo%e. Answer: c Section: 6-3 Level: Moderate Page: 115
/.
Which is not a .eature o. a ()* that ma3es learning a program eas- .or users? a.) >nline help b.) W?0*W?( .ormatting c.) 5ialog bo2es d.) 5etailed 3e- stro3es and commands e.) *cons Answer: d Level: Easy Section: 6-4 Page: 119 'n object is composed o.+ a.) properties. b.) methods. c.) e%ents. d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 6-5 Level: Easy Page: 120
4.
5.
Which statement about objects is true? a.) >ne object is used to create one class. b.) >ne class is used to create one object. c.) >ne object can create man- classes. d.) >ne class can create man- objects. e.) There is no relationship bet1een objects and classes. Answer: d Level: Moderate
Section: 6-5 .
Page: 120
Which is not true about .orms and controls in Visual Basic? a.) The- are pre-built. b.) The- are graphical objects. c.) Ne1 %ersions o. the classes must be created 1ith each project. d.) Buttons can be created 1ith the drag and drop method. e.) 'll o. the abo%e are true. Answer: c Section: 6-5 Level: Moderate Page: 120
8.
Which is an e2ample o. Visual Basic >bjects? a.) !ontrol objects b.) '06.NET c.) '5>.NET d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 6-5 Level: Moderate Page: 120
;.
The .Net class librar-+ a.) contains o%er &5,=== classes. b.) uses namespaces to manage all o. the classes. c.) has the 0-stem.9orm namespace .or classes used in Windo1s-based application. d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 6-5 Level: Hard Page: 120
<.
Which is not a propert- o. the !ommon control class? a.) 0ho1 b.) Bac3!olor c.) 9ont d.) 9ore!olor e.) Name Answer: a Section: 6-6 Level: Easy Page: 123
8=.
Which propert- determines 1hether a control is displa-ed to the user? a.) @ide b.) 0ho1 c.) Visible d.) Enabled e.) !ursor
Answer: c Section: 6-6 81. The Button control can be acti%ated+ a.) programmaticall- through the clic3 e%ent. b.) b- clic3ing the button 1ith the mouse. c.) 1ith the .ormAs 5e.aultButton propert-. d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 6-6 8&. The !ancelButton propert- belongs to 1hich object? a.) Button b.) 9orm c.) Babel d.) Te2tBo2 e.) Timer Answer: b Section: 6-6 8/.
Level: Hard Page: 123
Level: Moderate Page: 124
Level: Moderate Page: 124
' clic3 e%ent procedure stud .or the label control can be created b-+ a.) selecting the object and e%ent .rom the code editor 1indo1As drop-do1n bo2es. b.) t-ping the code in the code editor 1indo1. c.) b- double clic3ing the control. d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 6-7 Level: Moderate Page: 126
84.
*n e%ent-dri%en programming an e%ent is generated b-+ a.) the s-stem. b.) a userAs action. c.) the program itsel.. d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 6-7 Level: Moderate Page: 125
85.
Which is not a common control e%ent? a.) !lic3 b.) 0ingle!lic3 c.) 5ouble!lic3 d.) 7ouse7o%e e.) 7ouse5o1n
Answer: b Section: 6-7 8 . The Tic3 e%ent is .ound onl- in 1hich object? a.) 9orm b.) Button c.) Te2tBo2 d.) Babel e.) Timer Answer: e Section: 6-7 88. The 'cti%ated e%ent is .ound onl- in 1hich object? a.) 9orm b.) Button c.) Te2tBo2 d.) Babel e.) Timer Answer: a Section: 6-7 8;.
Level: Easy Page: 125
Level: Easy Page: 126
Level: Easy Page: 126
The :nd statement 1ill generate aCn)+ a.) decimal %alue bet1een =.=1 and 1.==. b.) integer %alue bet1een =.=1 and 1.==. c.) decimal %alue bet1een =.= and 1.=. d.) integer %alue bet1een =.= and 1.=. e.) decimal %alue bet1een =.= and up to 1.=, but not including 1.=. Answer: e Section: 6-7 Level: Moderate Page: 127
8<.
The anal-sis phase o. so.t1are de%elopment in%ol%es+ a.) collecting the reDuirements about 1hat the program 1ill accomplish. b.) creating a detailed plan on ho1 the program 1ill accomplish the reDuirements. c.) 1riting the so.t1are 1ith a program such as VB.NET. d.) Both a and b. e.) 'll o. the abo%e. Answer: a Section: 6-8 Level: Moderate Page: 129
;=.
Which phase o. project de%elopment t-picall- costs the most? a.) 'nal-sis b.) 5esign c.) *mplementation d.) 7aintenance e.) 5ocumentation
Answer: d Section: 6-8
Level: Easy Page: 129
Multiple Choice Questions
51. Which is not an integer data t-pe? a.) 0ingle b.) B-te c.) 0hort d.) *nteger e.) Bong Answer: a Section: 7-1 5&. Which is a numeric data t-pe? a.) 9loating point b.) *nteger c.) Boolean d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 7-1 Level: Moderate Page: 143 Level: Moderate Page: 143
5/.
Which seDuence o. char data t-pes is listed .rom lo1est to highest? a.) a, ', E, F b.) a, E, ', F c.) ', a, F, E d.) ', F, a, E e.) E, a, F, ' Answer: d Section: 7-1 Level: Moderate Page: 145
54.
The 5ate data t-pe does not hold 1hich t-pe o. in.ormation. a.) 0econds b.) @ours c.) 5a-s d.) 7onths e.) Guarters Answer: e Section: 7-1 Level: Easy Page: 145
55.
The Boolean data t-pe+ a.) is unsigned. b.) has t1o states. c.) is displa-ed b- the program as -es or no. d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 7-1 Level: Moderate Page: 144
5 .
Which is a %alid statement .or declaring a %ariable? a.) !onst 9orm 's *nteger b.) !onst m-9orm 's *nteger c.) 5im 9orm 's *nteger d.) 5im m-9orm 's *nteger e.) 'll o. the abo%e. Answer: d Section: 7-2 Level: Moderate Page: 147
58.
VB.Net identi.iers+ a.) are case sensiti%e. b.) can begin 1ith an underscore. c.) can begin 1ith a number. d.) Both a and b. e.) 'll o. the abo%e. Answer: b Section: 7-2 Level: Moderate Page: 147
5;.
The name o. a constant+ a.) must both begin 1ith a letter and be all upper case. b.) does not ha%e to begin 1ith a letter but must be all upper case. c.) must begin 1ith a letter but can be upper or lo1er case. d.) does not ha%e to begin 1ith a letter and be either upper or lo1er case. e.) None o. the abo%e. Answer: d Section: 7-2 Level: Moderate Page: 148
5<.
The proper operator precedence, .rom .irst to last, is+ a.) logical, comparison, and arithmetic. b.) arithmetic, comparison, and logical. c.) arithmetic, logical, and comparison. d.) comparison, arithmetic, and logical. e.) logical, arithmetic, comparison. Answer: b Section: 7-3 Level: Moderate Page: 151
=.
With ' H 9alse and B H True, 1hich statement e%aluates as True? a.) ' 'N5 ' b.) ' 'N5 B c.) B 'N5 ' d.) B 'N5 B e.) None are true. Answer: d Section: 7-3 Level: Easy Page: 151
1.
With ' H 9alse and B H True, 1hich statement e%aluates as 9alse? a.) ' >: ' b.) ' >: B c.) B >: ' d.) B >: B e.) None are true. Answer: a Section: 7-3 Level: Easy Page: 151
&.
Which operator is e%aluated .irst? a.) N>T b.) 'N5 c.) I>: d.) >: e.) The- are al1a-s e%aluated le.t-to-right. Answer: a Section: 7-3 Level: Moderate Page: 151
/.
The le.t side o. an assignment statement 1ill hold+ a.) a %ariable. b.) an object propert-. c.) an e2pression. d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 7-4 Level: Easy Page: 152
4.
The right side o. an assignment statement 1ill hold+ a.) a %ariable. b.) an object propert-. c.) an e2pression. d.) Both a and b. e.) 'll o. the abo%e. Answer: c Section: 7-4 Level: Easy Page: 152
5.
Which .unction 1ill return the monthl- pa-ments o. a loan? a.) 6a- C:ate, 6V, Nper) b.) 6mt C:ate, Nper, 6V) c.) 9V C:ate, Nper, 6mt) d.) 9V C:ate, Nper, 6V) e.) None o. the abo%e. Answer: b Section: 7-5 Level: Easy Page: 154
.
Which .unction returns the numbers represented in the string JK5 .8L? a.) 'bs b.) !5bl c.) *nt d.) :nd e.) Val Answer: b Section: 7-5 Level: Moderate Page: 153
8.
What 1ill the .unction Val CK1 5./=) return? a.) = b.) 1 5 c.) 1 5./= d.) K1 5./= e.) 'n error Answer: a Section: 7-5 Level: Easy Page: 153
;.
Which .unction displa-s a pop-up 1indo1? a.) 7sgBo2 b.) *nputBo2 c.) Te2tBo2 d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 7-6 Level: Easy Page: 156
<.
Which is true about the prompt argument? a.) *t can be made o. multiple %alues concatenated into one string. b.) *t can include the %b!rB. constant. c.) *t can include the ampersand s-mbol to concatenate strings. d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 7-6 Level: Easy Page: 157
8=.
*n order to process a number t-ped in a Te2tBo2 the programmer must+ a.) use the Val .unction to con%ert the Te2t %alue. b.) use the !5bl .unction to con%ert the Te2t %alue. c.) use the *sNumeric .unction to con%ert the Te2t %alue. d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 7-7 Level: Moderate Page: 158
81.
Which Te2tBo2 method does not use the clipboard? a.) !lear b.) !opc.) !ut d.) 6aste e.) 'll o. these methods use the clipboard. Answer: a Section: 7-7 Level: Easy Page: 159
8&.
Which Te2tBo2 propert- should al1a-s be changed .irst? a.) 'ccepts:eturn b.) Border0t-le c.) 9ont d.) Name e.) Te2t Answer: d Section: 7-7 Level: Moderate Page: 158
8/.
Which is not a %alid %alue .or the BistBo2 0ection7ode 6ropert-? a.) None b.) >ne c.) 7ulti0imple d.) 7ultiE2tended e.) 'll o. the abo%e. Answer: e Section: 7-8 Level: Moderate Page: 160
84.
0etting the 0elected*nde2 propert- o. a BistBo2 to -1 1ill+ a.) cause an error. b.) cannot be done. c.) de-select an- selected item. d.) Both a and b. e.) 'll o. the abo%e. Answer: c Section: 7-8 Level: Hard Page: 160
85.
Which method o. a BistBo2 1ill remo%e just one item at a time? a.) *tems.:emo%e't b.) *tem.:emo%e't c.) *tems.!lear't d.) *tem.!lear't e.) *tems.!lear Answer: a Section: 7-8 Level: Moderate Page: 160
8 .
The *tems propert- o. a !omboBo2+ a.) is a collection o. items. b.) is the same as the *tems propert- o. a BistBo2. c.) contains methods and properties. d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 7-9 Level: Moderate Page: 162
88.
Which %alue .or the !omboBo2 5rop5o1n0t-le propert- allo1s a user to t-pe in data? a.) 5rop5o1n b.) 5rop5o1n0imple c.) 5rop5o1nBist d.) Both a and b. e.) 'll o. the abo%e. Answer: a Section: 7-9 Level: Moderate Page: 164
8;.
Which t1o controls combined to .orm the !omboBo2 control? a.) BistBo2 and Te2tBo2 b.) BistBo2 and *nputBo2 c.) BistBo2 and 7sgBo2 d.) Babel and Te2tBo2 e.) Babel and *nputBo2 Answer: a Section: 7-9 Level: Easy Page: 162
Multiple Choice Questions
44. When a condition in an *.MThen statements tests true+ a.) the ne2t Else statement is acti%ated. b.) the ne2t *. statement is acti%ated. c.) the ne2t Then statement is acti%ated. d.) the End *. statement is acti%ated. e.) a condition can ne%er test true.
Answer: c Section: 8-1 45. The End *. statement is reDuired+ a.) in all *.MThen statements. b.) in all 7ulti-line statements 1ith Else. c.) in 0ingle Bine statements. d.) Both a and b. e.) 'll o. the abo%e. Answer: b Section: 8-1 4 . Which statements are optional in an *.MThen statement? a.) *. b.) Then c.) Else d.) Both a and b. e.) 'll o. the abo%e. Answer: c Section: 8-1 48.
Level: Moderate Page: 176
Level: Moderate Page: 177
Level: Easy Page: 177
Which selection process is an e2ample o. multiple branches .rom a single e2pression? a.) *.MThen b.) 0elect !ase c.) 5oMBoop d.) 9orMNe2t e.) 'll o. the abo%e. Answer: b Section: 8-2 Level: Hard Page: 179
4;.
@o1 man- times is the test e2pression o. a 0elect !ase e%aluated? a.) = b.) 1 c.) & d.) >nce .or each !ase. e.) *t depends on the %alue o. the test e2pression. Answer: b Section: 8-2 Level: Moderate Page: 180
4<.
Which is not a t-pe o. 0elect !ase test construct? a.) simple %alue b.) comple2 %alue c.) relational %alue 1ith *s d.) range o. %alues 1ith To e.) 'll o. the abo%e are t-pes o. test constructs. Answer: b Section: 8-2 Level: Hard Page: 180
5=.
What happens in a 0elect !ase construct 1hen a test %alue matches the test e2pression? a.) The corresponding bloc3 o. statements is run. b.) The ne2t !ase test %alue is chec3ed. c.) The !ase Else statement is run. d.) The 0elect !ase construct is e2ited. e.) 'n error is generated. Answer: a Section: 8-2 Level: Moderate Page: 180
51.
5o...Boop is an iterati%e statement because it+ a.) selects a bloc3 o. statements to run. b.) runs the same bloc3 o. statements repeatedl-. c.) selects a bloc3 o. statements and runs it repeatedl-. d.) selects a bloc3 o. statements and runs it a speci.ied number o. times. e.) 'll o. the abo%e. Answer: b Section: 8-3 Level: Hard Page: 181
5&.
Which is true o. a 5oMBoop? a.) The While condition goes a.ter the 5o 3e-1ord. b.) The )ntil condition goes a.ter the 5o 3e-1ord. c.) The While condition goes a.ter the Boop 3e-1ord. d.) The )ntil condition goes a.ter the Boop 3e-1ord. e.) 'll o. the abo%e. Answer: e Section: 8-3 Level: Easy Page: 181
5/.
Which 5oMBoop statement should be used to process test scores 1here a test score o%er 1== is a signal to stop the processing? a.) 5o While 0core N 1== b.) 5o )ntil 0core N 1== c.) Boop While 0core N 1== d.) Boop )ntil 0core N 1== e.) 'll o. the abo%e are %alid .or this situation. Answer: b Level: Hard
Section: 8-3 54.
Page: 182
*n the 9orMNe2t statement the de.ault %alue .or the 0tep is+ a.) -1 b.) = c.) 1 d.) & e.) There is no de.ault .or the step %alue. Answer: c Section: 8-4 Level: Easy Page: 184
55.
The 9orMNe2t Boop is used 1hen+ a.) a choice is made based on a Boolean condition. b.) a bloc3 o. statements is e2ecuted an un3no1n number o. times. c.) a bloc3 o. statements is e2ecuted a 3no1n number o. times. d.) Both a and b. e.) 'll o. the abo%e. Answer: c Section: 8-4 Level: Easy Page: 184
5 .
The ad%antage o. 9orMNe2t loops o%er 5oMBoops is that the- are+ a.) easier to read and maintain. b.) less prone to being in.inite loops. c.) good .or 1or3ing 1ith arra-s. d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 8-4 Level: Moderate Page: 185
58.
Which is not a %alid E2it statement? a.) E2it 5o b.) E2it 9or c.) E2it 9orm d.) E2it 0elect e.) E2it 0ub Answer: c Section: 8-5 Level: Moderate Page: 187
5;.
' sentinel %alue+ a.) is used to pre%ent in.inite loops. b.) must be a negati%e %alue. c.) signals the end o. a list o. data. d.) Both a and b. e.) 'll o. the abo%e. Answer: c Level: Easy
Section: 8-5 5<.
Page: 187
Which .unction should be used to %alidate that input is not a string be.ore per.orming arithmetic operations? a.) *s'rithmetic b.) *sNot0tring c.) *sNumeric d.) *s0tring e.) *sValue Answer: c Section: 8-5 Level: Moderate Page: 189
=.
Which is not a t-pe o. error programmers loo3 .or? a.) Bogic b.) :untime c.) 0uper.icial d.) 0-nta2 e.) 'll are errors programmers loo3 .or. Answer: c Section: 8-6 Level: Easy Page: 190
1.
Which action 1ill raise an e2ception? a.) 5i%iding b- Eero. b.) 'ssigning the string J@iL to an integer %ariable. c.) 'ccessing an empt- !5 dri%e. d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 8-6 Level: Easy Page: 190
&.
'n E2ception is another name .or a+ a.) compile error. b.) logic error. c.) runtime error. d.) super.icial error. e.) s-nta2 error. Answer: c Level: Moderate
Section: 8-6 /.
Page: 190
What is the most number o. states a !hec3Bo2 can ha%e? a.) = b.) 1 c.) & d.) / e.) 4 Answer: d Level: Moderate Section: 8-7 Page: 193 What is the standard pre.i2 .or the name o. a !hec3Bo2? a.) chb b.) ch3 c.) c3b d.) c32 e.) cb2 Answer: b Section: 8-7 Level: Easy Page: 193
4.
5.
' !hec3Bo2 can also appear as aCn)+ a.) button. b.) :adioButton. c.) 0crollBar. d.) Both a and b. e.) 'll o. the abo%e. Answer: a Section: 8-7 Level: Easy Page: 195
.
What is the standard pre.i2 .or the name o. a :adioButton? a.) rad b.) rab c.) rdo d.) rdb e.) rbt Answer: a Section: 8-8 Level: Easy Page: 195
8.
@o1 man- :adioButtons in a (roup Bo2 can be selected at the same time? a.) = b.) 1 c.) & d.) / e.) 4 Answer: b Level: Easy
Section: 8-8 ;.
Page: 195
Which e%ent is acti%ated 1hen a :adioButton is selected? a.) !hec3ed b.) !hec3ed!hanged c.) 0elected d.) 0elected!hanged e.) 0election!hanged Answer: b Section: 8-8 Level: Moderate Page: 196
Multiple Choice Questions
51. Which is a t-pe o. procedure .ound in VB.Net? a.) E%ent b.) 9unction c.) 0ub d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 9-1 5&. Level: Easy Page: 212
The methodolog- 1here code is bro3en into small, logical procedures is called+ a.) e%ent-dri%en programming. b.) .unctional programming. c.) granular programming. d.) modular programming. e.) procedural programming. Answer: d Section: 9-1 Level: Hard Page: 212
5/.
When using a procedure the calling code sends data %ia the+ a.) actual argument to the .ormal parameter o. the procedure. b.) .ormal argument to the actual parameter o. the procedure. c.) actual parameter to the .ormal argument o. the procedure. d.) .ormal parameter to the actual argument o. the procedure. e.) 'll o. the abo%e. Answer: a Section: 9-1 Level: Hard Page: 212
54.
9rom ho1 man- places in the code can a procedure be called? a.) =
b.) c.) d.) e.)
1 & / 's man- times as needed. Level: Easy Page: 212
Answer: e Section: 9-1 55. Which parameter is .ound in an e%ent procedure? a.) e b.) 0ender c.) :ecei%er d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 9-2 5 . Which is an optional element o. an e%ent procedure? a.) End 0ub b.) @andles c.) >bjectOE%ent d.) 0tatements e.) 0ub Answer: d Section: 9-2 58.
Level: Moderate Page: 213
Level: Moderate Page: 213
What happens 1hen a parameter in a procedure is declared B-Val? a.) >nl- arguments o. numeric data t-pes are allo1ed. b.) ' re.erence to the argument is sent to the procedure. c.) ' cop- o. the argument is sent to the procedure. d.) Both a and b. e.) 'll o. the abo%e. Answer: c Section: 9-2 Level: Easy Page: 213
5;.
Which is a %alid 1a- to 1rite the procedure stub .or an objectAs de.ault e%ent? a.) )se the !lass and 7ethod combo bo2es in the !ode Editor 1indo1. b.) 5ouble clic3 on the object in the 9orm 5esigner 1indo1. c.) T-pe the procedure declaration in the !ode Editor 1indo1. d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 9-2 Level: Moderate Page: 214
5<.
' sub procedure is %aluable because it+ a.) ma3es code easier to maintain.
b.) c.) d.) e.)
splits the logic to sol%e a problem into small, manageable units. limits the number o. times the code can be accessed. Both a and b. 'll o. the abo%e. Level: Moderate Page: 214
Answer: d Section: 9-3 =.
Which is not an optional element o. a sub procedure declaration? a.) 6arameters b.) 6ublic c.) 6ri%ate d.) 0tatements e.) 0ub Answer: e Section: 9-3 Level: Moderate Page: 215
1.
Which is a %alid 1a- to 1rite a sub procedure declaration? a.) )se the !lass and 7ethod combo bo2es in the !ode Editor 1indo1. b.) 5ouble clic3 on the object in the 9orm 5esigner 1indo1. c.) T-pe the procedure declaration in the !ode Editor 1indo1. d.) Both a and b. e.) 'll o. the abo%e. Answer: c Section: 9-3 Level: Moderate Page: 215
&.
Which statement 1ill send the %alue generated b- a .unction procedure, called !alculateTa2, bac3 to the calling code? a.) :eturn 0alesP=.=; b.) !alculateTa2 H 0alesP=.=; c.) :eturn !alculateTa2 C0alesP=.=;) d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 9-4 Level: Moderate Page: 217
/.
Which part o. a .unction procedure declaration statement is optional? a.) 5atat-pe
b.) c.) d.) e.)
9unction 6arameters 6ri%ate 6rocedureName Level: Hard Page: 217
Answer: c Section: 9-4 4.
@o1 man- return statements are allo1ed in a 9unction 6rocedure? a.) = b.) 1 c.) & d.) / e.) There is no limit. Answer: e Section: 9-4 Level: Easy Page: 217
5.
Wh- should a %ariable not be declared as a module %ariable? a.) *t pre%ents a procedure .rom being sel. contained. b.) *t ma3es it easier to document the code. c.) Bocal %ariable names can be reused in other procedures. d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 9-5 Level: Moderate Page: 219
.
Which %ariable name uses a standard naming con%ention .or module %ariables? a.) mWeight b.) mdWeight c.) modWeight d.) moduleWeight e.) moduleOWeight Answer: a Section: 9-5 Level: Easy Page: 218
8.
The scope o. a %ariable re.ers to+ a.) the length o. the %ariable. b.) the name o. the %ariable. c.) the accessibilit- o. the %ariable. d.) the datat-pe o. the %ariable. e.) the li.etime o. the %ariable. Answer: c Section: 9-5 Level: Moderate Page: 218
;.
What is the %alue o. the inde2 .or the .irst element in a VB.NET arra-? a.) =
b.) c.) d.) e.)
1 & / 5epends on 1hat the assigned %alue is. Level: Moderate Page: 219
Answer: a Section: 9-6 <.
Which method 1ill return the number o. elements in an arra-? a.) 5imension b.) Bength c.) Number d.) 0iEe e.) )pperBound Answer: b Section: 9-6 Level: Moderate Page: 219
8=. to?
*n the statement, 5im 5a-sC8) as 0tring, 1hat part o. the arra- does the number 8 re.er a.) b.) c.) d.) e.) 'rra- name 5atat-pe Bo1erbound )pperbound 0iEe Level: Moderate Page: 220
Answer: d Section: 9-6 81. What is reDuired to re.erence an element in an arra-? a.) 'rra- name b.) *nde2 %alue o. the element c.) Element %alue d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 9-6 8&.
Level: Moderate Page: 220
Which method 1ill arrange the elements o. an arra- in alphabetical order? a.) 'rrange b.) 'ssemble c.) >rder d.) :an3 e.) 0ort Answer: e Section: 9-6 Level: Easy Page: 222
8/.
The number o. %ariables allo1ed in a structured is+
a.) b.) c.) d.) e.)
= 1 & / 'n- number o. %ariables can be declared in an arra-. Level: Easy Page: 226
Answer: e Section: 9-7 84. The %ariable inside a structure is called aCn)+ a.) associate. b.) constituent. c.) element. d.) member. e.) part. Answer: d Section: 9-7 85. Which datat-pe can an arra- not hold? a.) Te2tBo2es b.) Babels c.) 0tructures d.) !ontrols e.) 'n arra- can hold all o. the abo%e. Answer: e Section: 9-8 8 .
Level: Moderate Page: 226
Level: Easy Page: 228
'n arra- o. controls can be populated b-+ a.) assigning e2isting controls to the arra-. b.) creating controls and assigning them to the arra-. c.) borro1ing controls that 1ill automaticall- assign them to the arra-. d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 9-8 Level: Moderate Page: 228
88.
The Tag propert- can+ a.) onl- hold string %alues. b.) onl- hold integer %alues. c.) onl- hold Boolean %alues. d.) onl- hold controls. e.) hold an- data de.ined b- the programmer. Answer: e Section: 9-8 Level: Hard Page: 228
8;.
The Qe-6ress e%ent 1ill capture pressing the 3e-+
a.) b.) c.) d.) e.)
'. shi.t. control. Both a and b. 'll o. the abo%e. Level: Easy Page: 233
Answer: a Section: 9-9 8<.
Which argument in the Qe-6ress parameter list contains the @andled propert-? a.) 0ender b.) e c.) >bject d.) Qe-6ressE%ent'rgs e.) None o. the abo%e. Answer: b Section: 9-9 Level: Hard Page: 233
Multiple Choice Questions
41. Which menu item is not t-picall- .ound in the 9ile 7enu? a.) !lose b.) !opc.) E2it d.) 6rint e.) 0a%e Answer: b Section: 10-1 Level: Easy Page: 250
4&.
What is the name o. the control .or putting menus on a .orm? a.) 9orm7enu b.) 7enu9orm c.) 7enu!ontrol d.) 7ain7enu e.) 7enu Answer: d Section: 10-1 Level: Easy Page: 251
4/.
The standard pre.i2 .or a menu item is+ a.) men.
b.) c.) d.) e.)
meu. mit. mni. mnu. Level: Easy Page: 254
Answer: e Section: 10-1 44.
Which menu object propert- places a chec3 mar3 in the displa- o. the menu te2t? a.) !hec3 b.) !hec3ed c.) !hec37ar3 d.) !hec3>n e.) :adio!hec3 Answer: b Section: 10-1 Level: Moderate Page: 253
45.
Which s-mbol creates an access 3e- in the te2t o. a menu item? a.) R b.) # c.) K d.) S e.) T Answer: e Section: 10-1 Level: Moderate Page: 252
4 .
Which is not a standard dialog bo2? a.) !olor5ialog b.) 9ont5ialog c.) >pen5ialog d.) 6rint5ialog e.) Foom5ialog Answer: e Section: 10-2 Level: Easy Page: 255
48.
Wh- are standard dialog bo2es used? a.) The- are eas- to create. b.) The- pro%ide .unctionalit- .amiliar to users. c.) 5e%elopers can create their o1n %ersions o. 5ialog bo2es. d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 10-2 Level: Moderate Page: 255
4;.
@o1 are dialog bo2es implemented in a program? a.) ' dialog bo2 is generated programmaticall-.
b.) c.) d.) e.)
' dialog control is placed in the component tra-. ' dialog control is placed on the .orm. Both a and b. 'll o. the abo%e. Level: Moderate Page: 255
Answer: d Section: 10-2 4<. The standard pre.i2 .or a dialog control is+ a.) dal. b.) dia. c.) dil. d.) dlc. e.) dlg. Answer: e Section: 10-3 5=.
Level: Easy Page: 257
What is the method used to acti%ate the color dialog bo2? a.) 'cti%ate5ialog b.) 5ispla-5ialog c.) E2hibit5ialog d.) 0ho15ialog e.) 0tart5ialog Answer: d Section: 10-3 Level: Moderate Page: 256
51.
The name o. the class used to programmaticall- create a color dialog bo2 is+ a.) !olor b.) !olorBo2 c.) !olor5ialog d.) !olor5isplae.) !olor5ispla-Bo2 Answer: c Section: 10-3 Level: Moderate Page: 257
5&.
The name o. the class used to programmaticall- create a .ont dialog bo2 is+ a.) 9ont. b.) 9ontBo2. c.) 9ont5ialog. d.) 9ont5ispla-. e.) 9ont5ialogBo2. Answer: c Section: 10-3 Level: Moderate Page: 258
5/.
Which >pen9ile5ialog control propert- speci.ies the choices in the J9iles o. t-peL dropdo1n bo2?
Which propert- is the same in the >pen9ile5ialog and the 0a%e9ile5ialog control? a.) 9ileName b.) 9ilter c.) *nitial5irectord.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 10-4 Level: Moderate Page: 259
55.
Which method is .ound in both the 0tream:eader and 0treamWriter class? a.) !lose b.) 6ea3 c.) 9lush d.) Both a and b. e.) 'll o. the abo%e. Answer: a Section: 10-4 Level: Easy Page: 259
5 .
The 0tream:eader and 0treamWriter class are both subclasses o. 1hich class? a.) *> b.) 0tream c.) 0tream*> d.) Both a and b. e.) 'll o. the abo%e. Answer: b Section: 10-4 Level: Hard Page: 260
58.
Which dialog control allo1s the user to Eoom in on a document? a.) 6rint5ialog b.) 6rint6re%ie1 c.) 6age0etup5ialog d.) Both a and b. e.) 'll o. the abo%e. Answer: b Section: 10-5 Level: Moderate Page: 262
5;.
Which dialog control has a 5ocument propert-?
a.) b.) c.) d.) e.)
6rint5ialog 6rint6re%ie1 6age0etup5ialog Both a and b. 'll o. the abo%e. Level: Easy Page: 264
Answer: e Section: 10-5 5<.
Which object must be assigned to the 5ocument propert-? a.) 5ocument b.) 5ocument6age c.) 5ocument6rint d.) 6age5ocument e.) 6rint5ocument Answer: e Section: 10-5 Level: Hard Page: 262
=.
When is the 6rint6age e%ent acti%ated? a.) When the 6rint5ialog control is displa-ed. b.) When an assignment is made to the 5ocument propert-. c.) The .irst time the 6rint method is called. d.) E%er- time a page is printed a.ter the 6rint method is called. e.) None o. the abo%e. Answer: d Section: 10-5 Level: Moderate Page: 262
1.
Which controls can acti%ate the 6rint6age e%ent? a.) 6rint5ialog b.) 6rint6re%ie1 c.) 6age0etup5ialog d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 10-5 Level: Moderate Page: 263
&.
Which t-pe o. .ile can be pla-ed 1ith the Windo1s 7edia 6la-er control? a.) 76E( b.) 'V* c.) W'V d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 10-6 Level: Easy Page: 265
/.
The Windo1s 7edia 6la-er control+
a.) b.) c.) d.) e.)
is located in the toolbo2 b- de.ault. is located in the toolbar. can be added to the toolbar. Both a and b. 'll o. the abo%e. Level: Moderate Page: 265
Answer: c Section: 10-6 4. The Windo1s 7edia 6la-er control can+ a.) displa- %ideo output. b.) create audio output. c.) generate tactile output. d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 10-6 5.
Level: Moderate Page: 265
Which Windo1s 7edia 6la-er control propert- 1ill hide the pla-er .rom userUs %ie1? a.) 'nchor b.) 9ileName c.) Bocation d.) 0ho1!ontrol e.) Visible Answer: e Section: 10-6 Level: Moderate Page: 266
Multiple Choice Questions
4 . Where is a single element o. data stored? a.) 9ield b.) :ecord c.) Table d.) Both a and b. e.) 'll o. the abo%e. Answer: a Section: 11-1 48. Where is a collection o. related data elements stored? a.) 9ield b.) :ecord c.) Table d.) Both a and b. e.) 'll o. the abo%e. Answer: b Section: 11-1 Level: Easy Page: 287 Level: Easy Page: 287
4;.
Which is true about the primar- 3e-? a.) E%er- table should ha%e a primar- 3e-. b.) ' primar- 3e- e2clusi%el- identi.ies each ro1 in a table. c.) ' primar- 3e- can be made o. multiple .ields. d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 11-1 Level: Moderate Page: 287
4<.
' .oreign 3e-+ a.) has nothing to do 1ith the primar- 3e-. b.) has di..erent %alues than the primar- 3e-. c.) is .ound in tables that donAt ha%e a primar- 3e-. d.) is related to the primar- 3e- o. a di..erent table. e.) is a uniDue record in a table. Answer: d Section: 11-1 Level: Hard Page: 287
5=.
Which is not a program that can create a database? a.) 'ccess b.) 7-0GB c.) >racle d.) 0GB 0er%er e.) 'll o. the abo%e can be used to create a database. Answer: e Section: 11-1 Level: Easy Page: 288
51.
What does the term 5B70 stand .or? a.) 5atabase 7anagement 0chema b.) 5atabase 7anagement 0t-le c.) 5atabase 7anagement 0-stem d.) 5atabase 7anipulation 0chema e.) 5atabase 7anipulation 0t-le Answer: c Section: 11-1 Level: Moderate Page: 288
5&.
The normaliEation process is+ a.) used to remo%e redundant data. b.) used to ma3e the storage o. data more e..icient. c.) not recommended .or most databases. d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 11-1 Level: Hard Page: 289
5/.
Which clause is reDuired in an 0GB Duer- .or getting in.ormation .rom a database? a.) $>*N b.) >N c.) >:5E: B? d.) 0EBE!T e.) W@E:E Answer: d Section: 11-2 Level: Moderate Page: 289
54.
@o1 man- .ields can be speci.ied in the 0EBE!T clause? a.) = b.) 1 c.) & d.) / e.) 's man- as needed. Answer: e Section: 11-2 Level: Moderate Page: 290
55.
@o1 man- records are speci.ied in the 0EBE!T clause? a.) = b.) 1 c.) & d.) / e.) 's man- as needed. Answer: a Section: 11-2 Level: Hard Page: 290
5 .
Which is the 1ildcard s-mbol .or selecting all the .ields in a table? a.) R b.) # c.) V d.) P e.) " Answer: d Section: 11-2 Level: Easy Page: 290
58.
The W@E:E clause is used to restrict the number o. OOOO retrie%ed b- an 0GB statement.
a.) b.) c.) d.) e.)
.ields records tables Both a and b. 'll o. the abo%e. Level: Easy Page: 291
Answer: b Section: 11-2 5;. Which is not a %alid t-pe o. $>*N? a.) BE9T $>*N b.) 7*55BE $>*N c.) :*(@T $>*N d.) *NNE: $>*N e.) 'll o. the abo%e are %alid t-pes. Answer: b Section: 11-2 5<. The >:5E: B? clause is used to sort+ a.) .ields. b.) records. c.) tables. d.) Both a and b. e.) 'll o. the abo%e. Answer: b Section: 11-2 =.
Level: Moderate Page: 293
Level: Moderate Page: 291
Which database is the '5>.NET 0Dl!onnection object designed .or? a.) 'ccess b.) 7icroso.t 0GB 0er%er c.) 7-0GB d.) >racle e.) None o. the abo%e. Answer: b Section: 11-3 Level: Easy Page: 294
1.
Which propert- o. the database must the connection object contain? a.) Bocation b.) T-pe c.) Guerd.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 11-3 Level: Moderate Page: 294
&.
Which is not a tab on the 5ataBin3 6ropert- 1indo1?
a.) b.) c.) d.) e.)
'd%anced 'll 'dapter !onnection 6ro%ider Level: Hard Page: 296
Answer: c Section: 11-3 /.
What in.ormation is speci.ied in the !onnection tab o. the 5ataBin3 1indo1? a.) 5atabase login b.) 5atabase name c.) 5atabase t-pe d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 11-3 Level: Hard Page: 297
4.
The .irst step o. con.iguring a 5ata'dapter is to select+ a.) an adapter object. b.) a connection object. c.) a database object. d.) a dataset object. e.) None o. the abo%e. Answer: b Section: 11-3 Level: Moderate Page: 298
5.
Which 5ata'dapter Guer- T-pe can be used 1ith the 'ccess database? a.) )se 0GB statements. b.) !reate ne1 stored procedure. c.) )se e2isting stored procedure. d.) Both a and b. e.) 'll o. the abo%e. Answer: a Section: 11-3 Level: Easy Page: 299
.
Which is not an '5>.NET 5ata'dapter >bject? a.) >le5b5ata'dapter b.) 0GB5ata'dapter c.) Guer-5ata'dapter d.) Both a and b. e.) 'll o. the abo%e. Answer: c Section: 11-3 Level: Easy Page: 299
8.
Which is the appropriate pre.i2 .or a 5ata'dapter object?
a.) b.) c.) d.) e.)
da daa dad dt dta Level: Easy Page: 300
Answer: a Section: 11-3 ;. Which t-pe o. object has the (enerate 5ataset method? a.) 'dapter object b.) !onnection object c.) 5atabase object d.) 5ataset object e.) None o. the abo%e. Answer: a Section: 11-3 <. Which is the appropriate pre.i2 .or a 5ataset object? a.) da b.) das c.) dat d.) ds e.) dst Answer: d Section: 11-3 8=. Which object does the data-a1are control bind to? a.) 5ataset b.) 5ata'dapter c.) !onnection d.) Both a and b. e.) 'll o. the abo%e. Answer: a Section: 11-4 81.
Level: Moderate Page: 300
Level: Easy Page: 300
Level: Easy Page: 300
What is the proper code to put data into the dataset called !ustomer5ataset using the !ustomer5ata'dapter object? a.) !ustomer5ataset.9illC!ustomer5ata'dapter) b.) !ustomer5ata'dapter.9illC!ustomer5ataset) c.) !ustomer5ataset.BoadC!ustomer5ata'dapter) d.) !ustomer5ata'dapter.BoadC!ustomer5ataset) e.) None o. the abo%e. Answer: b Section: 11-4 Level: Moderate Page: 303
8&.
Which object contains the 6osition propert- o. the current record in a dataset? a.) Binding!onte2t b.) Binding5ata c.) 5ataBinding d.) 5ataBound e.) 5ata!onte2t Answer: a Section: 11-4 Level: Moderate Page: 303
8/.
The .irst record in a dataset has a position propert- o.+ a.) Eero. b.) one. c.) an- %alue de.ined b- the programmer. d.) Both a and b. e.) 'll o. the abo%e. Answer: a Section: 11-4 Level: Easy Page: 303
84.
Which belo1 is speci.ied b- the 5ata7ember 6ropert-? a.) !onnection object b.) 5ata'dapter object c.) 5atabase .ield d.) 5atabase table e.) 5ataset object Answer: d Section: 11-5 Level: Moderate Page: 305
85.
Which belo1 is speci.ied b- the 5ata0ource 6ropert-? a.) !onnection object b.) 5ata'dapter object c.) 5atabase .ield d.) 5atabase table e.) 5ataset object Answer: e Section: 11-5 Level: Moderate Page: 305
8 .
Which is a propert- o. the 5ata(rid control? a.) 5ata7ember b.) 5ata0ource c.) 5ataGuerd.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 11-5 Level: Easy Page: 305
Multiple Choice Questions
41. @T7B stands .or+ a.) @uge 7a3eup Banguage. b.) @uge Te2t 7a3eup Banguage. c.) @-perte2t 7a3eup Banguage. d.) @-perte2t 7ar3up Banguage. e.) None o. the abo%e. Answer: d Section: 12-1 4&. Which s-mbol is used to enclose @T7B tags? a.) C ) b.) W N c.) X Y d.) Z [ e.) None o. the abo%e. Answer: b Section: 12-1 4/. Which s-mbol identi.ies an @T7B end tag? a.) \ b.) ] c.) ^ d.) _ e.) ? Answer: c Section: 12-1 44. Which @T7B tag does not use an end tag? a.) B b.) center c.) @: d.) * e.) ) Answer: c Section: 12-1 45. Level: Moderate Page: 321 Level: Moderate Page: 320 Level: Easy Page: 320 Level: Easy Page: 320
Which statement is not true? a.) 'n @T7B document can be displa-ed in an- internet bro1ser. b.) @T7B is used to change the .ormatting o. the displa-ed te2t. c.) 'n @T7B document is created 1ith an @T7B de%elopment editor. d.) Both a and b. e.) 'll o. the abo%e. Answer: c Level: Moderate
Section: 12-1 4 .
Page: 321
Which @T7B tag creates a lin3 to another bro1ser page? a.) ' hre. b.) ' re. c.) 'n hre. d.) 'n re. e.) hre. Answer: a Section: 12-1 Level: Hard Page: 321
48.
Which t-pe o. computer should host a 1eb ser%er? a.) 'pple b.) *B7 c.) 0un d.) )N*I e.) 'n- t-pe can host a 1eb ser%er. Answer: e Section: 12-2 Level: Easy Page: 322
4;.
Where does a 1eb application reside? a.) Web client b.) Web ser%er c.) Visual 0tudio .NET d.) Both a and b. e.) 'll o. the abo%e. Answer: b Section: 12-2 Level: Moderate Page: 322
4<.
Which is an e2ample o. a 1eb document? a.) 0er%er script b.) Web page c.) !lient bro1ser d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 12-2 Level: Hard Page: 322
5=. Which is an ad%antage o. using a Web application to deli%er an *n.ormation 0-stem solution? a.) 7ost end users are .amiliar 1ith using an internet bro1ser. b.) Web applications are plat.orm independent. c.) )pgrading the application is not %er- costl-. d.) Both a and b. e.) 'll o. the abo%e.
Answer: e Section: 12-2 51.
Level: Easy Page: 323
' postbac3 occurs 1hen+ a.) a bro1ser posts a .orm to the ser%er. b.) a userAs action acti%ates the handing o. a ser%er e%ent. c.) a ser%er posts a .orm to the client. d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 12-2 Level: Moderate Page: 323
5&.
When does a Jround tripL start in a 1eb application? a.) The ser%er reDuests an action .rom the user. b.) The user acti%ates a ser%er control e%ent. c.) The bro1ser posts a .orm to the ser%er. d.) The ser%er processes a control e%ent. e.) The ser%er posts a ne1 @T7B page. Answer: b Section: 12-2 Level: Hard Page: 323
5/.
Which so.t1are can be used to create an @T7B page? a.) Notepad b.) Word c.) Visual 0tudio .NET d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 12-3 Level: Moderate Page: 324
54.
Which set o. s-mbols are used to signi.- the presence o. '06.NET code? a.) WR b.) W# c.) WK d.) WS e.) WT Answer: d Section: 12-3 Level: Moderate Page: 324
55.
Which is the .ile e2tension used .or an '06.NET .ile? a.) asn b.) asp c.) aspn d.) asp2 e.) as2
Answer: d Section: 12-3 5 .
Level: Easy Page: 325
When an '06.NET .ile is placed on an **0 ser%er and %ie1ed through a bro1ser, the resulting @T7B page contains+ a.) all '06.NET code. b.) as much '06.NET code as is in the '06.NET .ile. c.) a mi2 o. '06.NET and @T7B code. d.) all @T7B code. e.) None o. the abo%e. Answer: d Section: 12-3 Level: Moderate Page: 326
58.
What is the e2tension .or a Visual Basic 1eb .orm inter.ace .ile? a.) .asp b.) .asp2 c.) .asp.%b d.) .asp2.%b e.) .asp.%b.net Answer: b Section: 12-4 Level: Easy Page: 327
5;.
What is the e2tension .or a Visual Basic 1eb .orm code .ile? a.) .asp b.) .asp2 c.) .asp.%b d.) .asp2.%b e.) .asp.%b.net Answer: d Section: 12-4 Level: Easy Page: 327
5<.
Which user action 1ill not generate a ser%er-side e%ent? a.) 7ouse 7o%e b.) Te2t !hange c.) Button !lic3 d.) Both a and b. e.) 'll o. the abo%e. Answer: a Section: 12-4 Level: Moderate Page: 327
=.
Because o. the latenc- o. a round-trip on the internet+ a.) the inter.ace and code o. a 1eb .orm are stored in separate .iles. b.) onl- some user actions, such as button clic3s, 1ill generate e%ents. c.) it is best to use ser%er-side control. d.) 1eb applications should be coded in Visual Basic. e.) None o. the abo%e.
Answer: b Section: 12-4 1. Which propert- is used to name a 1eb control? a.) !ontrolName b.) 5esignation c.) *5 d.) Name e.) Title Answer: c Section: 12-4 &. Which language is used to create an '06.NET code .ile? a.) Visual Basic b.) !# c.) !"" d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 12-4 /.
Level: Hard Page: 327
Level: Moderate Page: 330
Level: Moderate Page: 331
*t is best to use a 1eb instead o. a 1indo1s application 1hen the application+ a.) has a thin .ront end Cclient). b.) needs to be a%ailable to the public. c.) must be plat.orm-independent. d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 12-4 Level: Moderate Page: 332
Multiple Choice Questions
/1. Which is not a .undamental ser%ice identi.ied in a three-tier architecture? a.) 'ssociation la-er b.) !onnection la-er c.) Bogical la-er d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 13-1 /&. Which la-er is e2empli.ied b- a 1eb ser%er? a.) 'pplication b.) 'ssociation c.) 5ata d.) Bogical Level: Moderate Page: 345
e.) 6resentation Answer: a Section: 13-1 //. Which la-er is e2empli.ied b- a .at client? a.) 'pplication b.) 'ssociation c.) 5ata d.) Bogical e.) 6resentation Answer: e Section: 13-1 /4. Which la-er is e2empli.ied b- the use o. '5>.NET? a.) 'pplication b.) 'ssociation c.) 5ata d.) Bogical e.) 6resentation Answer: c Section: 13-1 Level: Moderate Page: 345 Level: Moderate Page: 345 Level: Easy Page: 345
/5.
@o1 1ill using a middle tier t-picall- a..ect the number o. connections to a database? a.) *ncrease the number b.) @a%e no e..ect on the number c.) 5ecrease the number d.) *t depends on the t-pe o. client. e.) *t depends on the t-pe o. database. Answer: c Section: 13-1 Level: Hard Page: 345
/ .
'n application la-er+ a.) 1ill contain business logic. b.) manage connections to the database. c.) can be distributed o%er man- computers. d.) Both a and b. e.) 'll o. the abo%e.
Answer: e Section: 13-1 /8. ' data la-er is responsible .or+ a.) retrie%ing in.ormation .rom a database. b.) updating in.ormation in a database. c.) deleting in.ormation in a database. d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 13-1 /;.
Level: Moderate Page: 345
Level: Easy Page: 345
What is the minimum number o. computers in a three-tier architecture? a.) = b.) 1 c.) & d.) / e.) 4 or more Answer: b Section: 13-1 Level: Easy Page: 346
/<.
' ser%er .arm is+ a.) an e2ample o. a distributed application. b.) ma3es it eas- to add ne1 computers i. demand increases. c.) applies onl- to 1eb ser%ers. d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 13-1 Level: Moderate Page: 346
4=.
Which is a %alid t-pe o. state management .or the creation o. 1eb pages? a.) !lient side b.) 0er%er side c.) 5ata side d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 13-2 Level: Easy Page: 346
41.
The stateless @TT6 protocol re.ers to 1eb pages created+ a.) on a 1eb ser%er. b.) 1ithout in.ormation .rom a database. c.) 1ithout 3no1ledge o. pre%ious 1eb pages. d.) be.ore a reDuest .rom a client. e.) on a client machine.
Answer: c Section: 13-2 4&.
Level: Moderate Page: 346
!lient-side state management techniDues are appropriate 1hen using+ a.) sensiti%e in.ormation. b.) critical applications. c.) an intranet. d.) Both a and b. e.) 'll o. the abo%e. Answer: c Section: 13-3 Level: Moderate Page: 346
4/.
Where does the %ie1 state store in.ormation? a.) @T7B source b.) Te2t .ile c.) ):B d.) Both a and b. e.) 'll o. the abo%e. Answer: a Section: 13-3 Level: Moderate Page: 347
44.
Where does the Duer- string store in.ormation? a.) @T7B source b.) Te2t .ile c.) ):B d.) Both a and b. e.) 'll o. the abo%e. Answer: c Section: 13-3 Level: Moderate Page: 347
45.
Where do coo3ies store in.ormation? a.) @T7B source b.) Te2t .ile c.) ):B d.) Both a and b. e.) 'll o. the abo%e. Answer: b Section: 13-3 Level: Moderate Page: 347
4 .
Which client-side techniDue is speci.ic to '06.NET? a.) !oo3ies b.) Guer- string c.) Vie1 state d.) Both a and b. e.) 'll o. the abo%e.
Answer: c Section: 13-3 48.
Level: Hard Page: 347
Which client-side techniDue can be disabled b- the end-user? a.) !oo3ies b.) Guer- string c.) Vie1 state d.) Both a and b. e.) 'll o. the abo%e. Answer: a Section: 13-3 Level: Moderate Page: 347
4;.
What s-mbol speci.ies the beginning o. a Duer- string? a.) R b.) # c.) K d.) S e.) ? Answer: e Section: 13-3 Level: Easy Page: 347
4<.
What is the s-nta2 .or creating and using an application %ariable? a.) 'pplication.VariableName = Val e b.) 'pplication.VariableName = !Val e" c.) 'pplicationCVariableName" = Val e d.) 'pplicationCVariableName" = !Val e" e.) 'pplicationCJVariableName#" = Val e Answer: e Section: 13-4 Level: Moderate Page: 348
5=.
Which ser%er-side techniDue is a%ailable in '06.NET? a.) 'pplication states b.) 0ession states c.) 5atabase support d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 13-4 Level: Easy Page: 349
51.
'n 'pplication %ariable is created+ a.) 1hen the application is .irst placed on a 1eb ser%er. b.) 1hen the 1eb ser%er is .irst started. c.) 1hen the .irst client reDuests a ):B resource. d.) e%er- time a client reDuests a ):B resource. e.) e%er- time a ne1 client interacts 1ith the 1eb application.
Answer: c Section: 13-4 5&.
Level: Moderate Page: 348
' 0ession %ariable is created+ a.) 1hen the application is .irst placed on a 1eb ser%er. b.) 1hen the 1eb ser%er is .irst started. c.) 1hen the .irst client reDuests a ):B resource. d.) e%er- time a client reDuests a ):B resource. e.) e%er- time a ne1 client interacts 1ith the 1eb application. Answer: e Section: 13-4 Level: Moderate Page: 349
5/.
*. there is no acti%it- .rom a bro1ser, ho1 long 1ill a session %ariable last? a.) 1= minutes b.) &= minutes c.) = minutes d.) 1== minutes e.) &== minutes Answer: b Section: 13-4 Level: Easy Page: 349
54.
Which is not a reason .or using a database to store state in.ormation? a.) The capacit- to store high %olumes o. in.ormation b.) The abilit- to use data mining techniDues on the stored in.ormation c.) The abilit- to use application and session %ariables d.) 0ecurit- .rom unauthoriEed use e.) The po1er to easil- Duer- .or speci.ic in.ormation Answer: c Section: 13-4 Level: Hard Page: 350
Multiple Choice Questions
/8. Which control is an e2ample o. an object in VB.NET? a.) Button b.) Babel c.) Te2tbo2 d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 14-1 /;. Which o. the .ollo1ing is part o. an object? a.) 7ethods b.) 6roperties c.) *nstances d.) Both a and b. Level: Easy Page: 390
e.) 'll o. the abo%e. Answer: d Section: 14-1 /<. Which is true about objects? a.) >bjects are used to create classes. b.) >bjects are analogous to blueprints. c.) >bjects combine actions and data. d.) Both a and b. e.) 'll o. the abo%e. Answer: c Section: 14-1 Level: Moderate Page: 391 Level: Moderate Page: 390
4=.
6roperties are used to represent+ a.) actions. b.) classes. c.) data. d.) e%ents. e.) instances. Answer: c Section: 14-1 Level: Easy Page: 391
41.
7ethods are used to represent+ a.) actions. b.) classes. c.) data. d.) e%ents. e.) instances. Answer: a Section: 14-1 Level: Easy Page: 391
4&.
The term instantiation re.ers to the creation o.+ a.) a class .rom a blueprint. b.) an object .rom a class. c.) a method .rom an object. d.) a propert- .rom a method. e.) a blueprint .rom a propert-.
Answer: b Section: 14-1 4/. 'n-thing in VB.NET that has a propert- or method is+ a.) a class. b.) a control. c.) an object. d.) Both a and b. e.) 'll o. the abo%e. Answer: c Section: 14-1 44.
Level: Moderate Page: 391
Level: Moderate Page: 391
Which .eature is needed to ma3e a programming language object oriented? a.) Encapsulation b.) *nheritance c.) 6ol-morphism d.) Both a and b. e.) 'll o. the abo%e. Answer: e Section: 14-2 Level: Easy Page: 391
45.
We should thin3 o. the practice o. object-oriented programming as+ a.) a simple ans1er to the comple2 problem o. creating so.t1are. b.) an incremental impro%ement to the problem o. creating so.t1are. c.) the 1a- to get rid o. a 1ere1ol.. d.) Both a and b. e.) 'll o. the abo%e. Answer: b Section: 14-2 Level: Moderate Page: 391
4 .
Encapsulation ma3es it easier to+ a.) reuse and modi.- e2isting modules o. code. b.) 1rite and read code b- sharing method names. c.) hide and protect data .rom e2ternal code. d.) Both a and b. e.) 'll o. the abo%e. Answer: c Section: 14-2 Level: Moderate Page: 392
48.
*nheritance ma3es it easier to+ a.) reuse and modi.- e2isting modules o. code. b.) 1rite and read code b- sharing method names. c.) hide and protect data .rom e2ternal code. d.) Both a and b. e.) 'll o. the abo%e.
Answer: a Section: 14-2 4;. 6ol-morphism ma3es it easier to+ a.) reuse and modi.- e2isting modules o. code. b.) 1rite and read code b- sharing method names. c.) hide and protect data .rom e2ternal code. d.) Both a and b. e.) 'll o. the abo%e. Answer: b Section: 14-2 4<. The standard pre.i2 to signi.- a class is+ a.) B. b.) !. c.) B. d.) 0. e.) T. Answer: e Section: 14-2 5=.
Level: Moderate Page: 392
Level: Moderate Page: 393
Level: Moderate Page: 392
When using encapsulation ho1 should data be shared 1ith e2ternal code? a.) E%ents b.) 7ethods c.) 6roperties d.) 6ri%ate %ariables e.) 6ublic %ariables Answer: c Section: 14-2 Level: Moderate Page: 392
51.
Which statement is true? a.) ' base class inherits some o. the properties o. a deri%ed class. b.) ' base class inherits all o. the properties o. a deri%ed class. c.) ' deri%ed class inherits some o. the properties o. a base class. d.) ' deri%ed class inherits all o. the properties o. a base class. e.) None o. the abo%e. Answer: d Section: 14-2 Level: Moderate Page: 392
5&.
When a base class is changed+ a.) there is no e..ect on the deri%ed class. b.) the deri%ed class changes 1hen the 3e- 1ord >%erridden is used. c.) onl- the methods o. the deri%ed class change. d.) onl- the properties o. the deri%ed class change. e.) the deri%ed class automaticall- changes.
Answer: e Section: 14-2 5/. 6ol-morphism can appl- to+ a.) math operators. b.) method names. c.) object names. d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 14-2 54. With pol-morphism+ a.) one method can ha%e multiple names. b.) one object can ha%e multiple names. c.) man- methods can share the same name. d.) man- objects can share the same name. e.) None o. the abo%e statements are true. Answer: c Section: 14-2 55. Which element o. a class is optional? a.) !onstructs b.) 9ields c.) 7ethods d.) 6roperties e.) 'll o. the abo%e. Answer: e Section: 14-3 5 .
Level: Easy Page: 392
Level: Moderate Page: 393
Level: Hard Page: 393
Level: Moderate Page: 394
What is the suggested order .or the de.inition o. class elements .rom .irst to last? a.) !onstructs, .ields, methods, properties b.) 6roperties, constructs, .ields, methods c.) 9ields, properties, constructs, methods d.) !onstructs, properties, .ields, methods e.) 7ethods, constructs, properties, .ields Answer: c Section: 14-3 Level: Hard Page: 394
58.
The standard .or designing a .ield is that it be de.ined as a+ a.) pri%ate method. b.) public method. c.) pri%ate %ariable. d.) public %ariable. e.) None o. the abo%e.
Answer: c Section: 14-3 5;. What is the s-nta2 .or ma3ing a propert- read-onl-? a.) 6ropert- :ead $ro$erty%ame 's dataty$e b.) :ead 6ropert- $ro$erty%ame 's dataty$e c.) :ead>nl- 6ropert- $ro$erty%ame 's dataty$e d.) :ead->nl- 6ropert- $ro$erty%ame 's dataty$e e.) :> 6ropert- $ro$erty%ame 's dataty$e Answer: c Section: 14-3 5<. The (et procedure o. a propert- acts li3e+ a.) an e%ent. b.) a .unction. c.) a %ariable. d.) Both a and b. e.) 'll o. the abo%e. Answer: b Section: 14-3 =. ' method in a class is+ a.) a sub procedure. b.) a .unction. c.) an e%ent. d.) Both a and b. e.) 'll o. the abo%e. Answer: d Section: 14-3 1. @o1 man- constructors can a class ha%e? a.) = b.) 1 c.) & d.) / e.) 'll o. the abo%e. Answer: e Section: 14-3 &. ' constructor is a special t-pe o.+ a.) class. b.) .ield. c.) method. d.) propert-. e.) %ariable.
Level: Moderate Page: 393
Level: Moderate Page: 395
Level: Hard Page: 395
Level: Moderate Page: 396
Level: Easy Page: 397
Answer: c Section: 14-3 /.
Level: Easy Page: 397
Which is true .or constructors in a class? a.) 'll constructors must ha%e the same number o. parameters. b.) 'll constructors must be the same parameter data t-pe. c.) 0ome constructors can ha%e the same list o. parameters. d.) >nl- t1o constructors in a class can ha%e the same list o. parameters. e.) No t1o constructors in a class can ha%e the same list o. parameters. Answer: e Section: 14-3 Level: Moderate Page: 397
4.
Which statement 1ill call a constructor o. a base class? a.) Base.Ne1C ) b.) Base!onstructor.Ne1 C ) c.) !allBase.Ne1C ) d.) !onstructor.Ne1 C ) e.) 7-Base.Ne1C ) Answer: e Section: 14-3 Level: Moderate Page: 397