Professional Documents
Culture Documents
2. Instead of typing the menu name on a MenuStrip object, you can add a ____ by clicking the Type Here box’s list arrow
and selecting the appropriate choice
a. radio button
b. combo box
c. menu item
d. text box
ANSWER: b, c, d
POINTS: 1
REFERENCES: 363
3. A compound operator allows you to ____ values, storing the result in the same variable.
a. add
b. multiply
c. subtract
d. divide
ANSWER: a, b, c, d
POINTS: 1
REFERENCES: 378
4. The ____ values used in a For...Next loop can vary based on input from a user.
a. beginning
b. Step
c. ending
d. range
ANSWER: a, b, c
POINTS: 1
REFERENCES: 385
5. The Publish Wizard allows you to create an install file to be placed on a ____.
a. USB drive
b. network
c. web server
d. hard disk
ANSWER: a, b, c, d
POINTS: 1
REFERENCES: 406
6. When used in a menu name, the asterisk character is used to indicate that a character is a hot key.
_________________________
ANSWER: False - ampersand
POINTS: 1
REFERENCES: 363
8. Smart actions can be specified for a menu by using Action Tags. _________________________
ANSWER: True
POINTS: 1
REFERENCES: 366
9. The Checked property of a ListBox object identifies which item in the ListBox has been selected.
_________________________
ANSWER: False - SelectedItem
POINTS: 1
REFERENCES: 375
10. Double-tapping or double-clicking a button object on the Windows Form object opens the event handler for that
button. _________________________
ANSWER: True
POINTS: 1
REFERENCES: 418
ANSWER: d
POINTS: 1
REFERENCES: 362
13. The ____ character is used to indicate that a letter is a hot key on a menu item.
a. ampersand (&)
b. forward slash (/)
c. back slash (\)
d. underscore (_)
ANSWER: a
POINTS: 1
REFERENCES: 363
14. The hot key for a menu item can be activated with the keyboard by pressing the ____ key and the hot key at the same
time.
a. ALT
b. SHIFT
c. CTRL
d. TAB
ANSWER: a
POINTS: 1
REFERENCES: 363
15. A(n) ____ key provides a keyboard shortcut for opening a menu.
a. hot
b. spot
c. legend
d. index
ANSWER: a
POINTS: 1
REFERENCES: 363
16. As shown in the accompanying figure, Visual Basic 2015 contains a(n) ____ Tag that allows you to create a full
standard menu bar commonly provided in Windows programs.
a. Menu
b. Action
c. Legend
d. Glossary
ANSWER: b
POINTS: 1
REFERENCES: 366
17. The feature shown in the accompanying figure provides an easy way for you to specify ____ actions for an object as
you design a form.
a. baseline
b. smart
c. indexed
d. object-oriented
ANSWER: b
POINTS: 1
REFERENCES: 366
18. The ____ function provides a dialog box that asks the user for input and provides an input area.
a. InputArea
b. InputBox
c. MessageBox
Cengage Learning Testing, Powered by Cognero Page 4
Name: Class: Date:
d. UserEntry
ANSWER: b
POINTS: 1
REFERENCES: 367
19. A ____ object displays a collection of items, or values, with one item per line.
a. TextBox
b. RadioButton
c. ListBox
d. CheckBox
ANSWER: c
POINTS: 1
REFERENCES: 370
20. Which line of code will add the value “East” to a ListBox object named lstDirections?
a. lstDirections.Add(“East”)
b. lstDirections.Items.Add(“East”)
c. lstDirections.AddValue(“East”)
d. lstDirections.Items.AddValue(“East”)
ANSWER: b
POINTS: 1
REFERENCES: 371
21. To remove all objects from a ListBox object, the ____ method is used.
a. Clear
b. Items.Clear
c. Empty
d. Items.Empty
ANSWER: a
POINTS: 1
REFERENCES: 372
22. The ____ property of a ListBox object identifies which item in the ListBox was selected.
a. Item
b. ItemSelected
c. Selected
d. SelectedItem
ANSWER: d
POINTS: 1
REFERENCES: 375
23. A(n) ____ variable collects a total value over a period of time.
a. catalog
b. glossary
c. register
d. accumulator
ANSWER: d
POINTS: 1
REFERENCES: 377
24. A(n) ____ variable keeps track of how many times a loop has executed.
a. counter
b. accumulator
c. glossary
d. register
ANSWER: a
POINTS: 1
REFERENCES: 377
25. A ____ operator allows you to perform arithmetic operations with a variable and store the results back to that variable.
a. logical
b. rational
c. compressed
d. compound
ANSWER: d
POINTS: 1
REFERENCES: 378
26. The compound operator ____ adds the value of the right operand to the value of the left operand and stores the result
in the left operand’s variable.
a. ++
b. +=
c. =+
d. ==
ANSWER: b
POINTS: 1
REFERENCES: 378
27. The compound operator ____ is used to add a string to an existing string.
a. &=
b. =&
c. &&
d. ==
ANSWER: a
POINTS: 1
REFERENCES: 379
29. A ____ loop is best used when the specific number of iterations required is known.
a. Do…While
b. Do…Until
c. For...Next
d. For…Until
ANSWER: c
POINTS: 1
REFERENCES: 380
30. A loop’s ____ variable is a numeric variable that keeps track of the number of iterations the loop completes.
a. compound
b. accumulated
c. matrix
d. control
ANSWER: d
POINTS: 1
REFERENCES: 380
32. A For...Next loop with a beginning value of 1, an ending value of 25, and a Step value of 3 will execute ____ times.
a. 3
b. 8
c. 9
d. 25
ANSWER: c
POINTS: 1
REFERENCES: 382
a. 3
b. 4
c. 6
d. 7
ANSWER: b
POINTS: 1
REFERENCES: 382
a. 4
b. 5
c. 9
d. 10
ANSWER: b
POINTS: 1
REFERENCES: 382
35. If ____ appears as the first line of a loop, the loop is a top-controlled Do loop that will execute as long as a condition
remains true.
a. Loop While
b. Do While
c. Loop Until
d. Do Until
ANSWER: b
POINTS: 1
REFERENCES: 387
36. A ____-controlled loop tests the condition before the loop body is executed.
a. bottom
b. key
c. top
d. function
ANSWER: c
POINTS: 1
REFERENCES: 387
37. A ____-controlled loop tests the condition after the code in the loop body has been executed.
a. bottom
b. function
c. top
d. key
ANSWER: a
POINTS: 1
REFERENCES: 387
38. If ____ appears as the last line of a loop, the loop is a bottom-controlled Do loop that will execute as long as a
condition remains true.
a. Loop While
b. Do While
c. Loop Until
d. Do Until
ANSWER: a
POINTS: 1
REFERENCES: 390
39. If ____ appears as the first line of a loop, the loop is a top-controlled Do loop that will stop execution when a
condition becomes true.
a. Loop While
b. Do While
c. Loop Until
d. Do Until
ANSWER: d
POINTS: 1
REFERENCES: 392
40. If ____ appears as the last line of a loop, the loop is a bottom-controlled Do loop that will stop execution when a
condition becomes true.
a. Loop While
b. Do While
c. Until
d. Loop Until
ANSWER: d
POINTS: 1
REFERENCES: 393
c. runaway
d. unstoppable
ANSWER: b
POINTS: 1
REFERENCES: 394
42. Using a preset value for the variable tested in a loop condition is a process called ____ the loop.
a. iterating
b. priming
c. presetting
d. rebanding
ANSWER: b
POINTS: 1
REFERENCES: 394
43. The ____ function can be used to test if data entered by the user is numeric.
a. IsInteger
b. IsNumber
c. IsNumeric
d. IsNonAlpha
ANSWER: c
POINTS: 1
REFERENCES: 396
44. What will be the value of the variable intTotalCount when the following code is executed?
For intOuterCount = 1 to 5
For intInnerCount = 1 to 4
intTotalCount +=1
Next
Next
a. 4
b. 5
c. 9
d. 20
ANSWER: d
POINTS: 1
REFERENCES: 398
45. When in break mode, you can use ____ to examine the value of variables.
a. DataTags
b. DataTips
c. DebugTags
d. DebugTips
ANSWER: b
Cengage Learning Testing, Powered by Cognero Page 10
Name: Class: Date:
POINTS: 1
REFERENCES: 399
46. ____ are stop points placed in the code to tell Visual Studio 2015 debugger where and when to pause the execution of
the program.
a. Breakpoints
b. Debug points
c. Halt points
d. Tracepoints
ANSWER: a
POINTS: 1
REFERENCES: 399
48. You can place an executable version of a program on your hard disk, on a web server, or on a network server by using
the ____ process.
a. ClickDeploy Installation
b. ClickInstall Deployment
c. ClickOnce Deployment
d. ClickPublish Deployment
ANSWER: c
POINTS: 1
REFERENCES: 405
50. In order to run a program deployed with ClickOnce Deployment, the computer needs ____ installed on it.
a. Microsoft Word
b. Visual Studio 2015
Cengage Learning Testing, Powered by Cognero Page 11
Name: Class: Date:
c. PowerBuilder
d. none of the above
ANSWER: d
POINTS: 1
REFERENCES: 405
51. MenuStrip objects can be placed along any edge of the form, depending on which side is closer to the mouse pointer.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 362
53. Writing an event handler for a menu item is the same as writing an event handler for a button tap or click.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 365
54. The InputBox function returns a null string (“”) when a user taps or clicks the Cancel button.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 367
55. You can use the InputBox function instead of a TextBox object to obtain input.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 367
56. An InputBox object allows user input without the need for a TextBox object on the Windows Form object.
a. True
b. False
Cengage Learning Testing, Powered by Cognero Page 12
Name: Class: Date:
ANSWER: True
POINTS: 1
REFERENCES: 367
57. When the user clicks the Cancel button in an input box and the InputBox function returns a null character, the program
can test for the null character to determine further processing.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 370
58. The BackgroundImage property of the Form object cannot use imported as the background image; the image must be
drawn from the Visual Studio library.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 375
60. To remove the picture in the background of a form, in the Properties window press and hold or right-click the ellipsis
button of the BackgroundImage property and select Reset.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 376
61. You must include a Step value in a For...Next loop, even if the Step value is 1.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 381
62. The Step value for a For...Next loop must be a positive whole integer value.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 382
64. It is best to indent the body of the loop, to identify clearly the code that is being repeated.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 385
65. The beginning, ending, and Step values used in a For...Next loop can vary based on input from a user.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 385
66. In a Do While loop, the body of the loop is executed until the condition becomes true.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 387
68. Starting a loop with a preset value for the variable tested in the condition is called priming the loop.
a. True
b. False
ANSWER: True
Cengage Learning Testing, Powered by Cognero Page 14
Name: Class: Date:
POINTS: 1
REFERENCES: 394
69. You must test the data a user enters to ensure it is accurate and that its use in other programming statements will not
cause a program exception.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 396
71. When nesting loops, the inner loop must be completely contained in the outer loop and must use a different control
variable.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 398
73. Breakpoints are stop points placed in the code where execution will be paused during the execution of the program,
and enter debug mode.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 399
ANSWER: False
POINTS: 1
REFERENCES: 403
75. The installation files created by the ClickOnce Publishing Wizard can be used for a software release.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 409
76. A(n) ____________________ is a strip across the top of a window that contains one or more menu names.
ANSWER: menu bar
POINTS: 1
REFERENCES: 360
78. In Visual Studio 2015, a(n) ____________________ object is used to place menus at the top of a Windows Form.
ANSWER: MenuStrip
POINTS: 1
REFERENCES: 361
79. The nongraphical Toolbox objects, such as MenuStrip objects, are organized and displayed below the form in the
____________________ at the bottom of the Visual Studio interface.
ANSWER: Component Tray
POINTS: 1
REFERENCES: 362
80. The ____________________ procedure of the Windows Form object closes a window and terminates a program.
ANSWER: Close
POINTS: 1
REFERENCES: 365
81. A(n) ____________________ object is a dialog box that prompts the user to enter a value.
ANSWER: InputBox
POINTS: 1
REFERENCES: 367
82. The values in a ListBox like the kind shown in the accompanying figure are called ____________________.
ANSWER: items
POINTS: 1
REFERENCES: 371
ANSWER: SelectedItem
POINTS: 1
REFERENCES: 375
86. A(n) ____________________ value is the value in a For...Next loop that is added to, or subtracted from, the
beginning value on each iteration of the loop.
ANSWER: Step
step
POINTS: 1
REFERENCES: 381
87. A(n) ____________________ loop should be used when the iterations should continue while or until a condition is
true or false.
ANSWER: Do
POINTS: 1
REFERENCES: 387
88. A(n) ____________________ loop should be used when the iterations should continue as long as a condition remains
true.
ANSWER: Do While
POINTS: 1
REFERENCES: 387
89. A(n) ____________________ loop should be used when the iterations should continue until a condition becomes true.
ANSWER: Do Until
POINTS: 1
REFERENCES: 387
90. A(n) ____________________ loop is a loop placed completely inside another loop.
ANSWER: nested
POINTS: 1
REFERENCES: 398
91. The process of ____________________ involves resolving defects in the program code.
ANSWER: debugging
Cengage Learning Testing, Powered by Cognero Page 18
Name: Class: Date:
POINTS: 1
REFERENCES: 399
92. A(n) ____________________ is used to pause the execution of code while debugging.
ANSWER: breakpoint
POINTS: 1
REFERENCES: 399
93. While in break mode, you can examine the values in all variables that are within the scope of execution through the
use of ____________________.
ANSWER: DataTips
POINTS: 1
REFERENCES: 399
94. After an application is completely debugged and working properly, you can ____________________ it.
ANSWER: deploy
POINTS: 1
REFERENCES: 405
95. In Visual Basic 2015, a deployed program can be created easily by using ____________________ Deployment.
ANSWER: ClickOnce
POINTS: 1
REFERENCES: 405
Identify the letter of the choice that best matches the phrase or definition
a. ListBox
b. wizard
c. bottom-controlled
d. infinite
e. accumulator
f. For...Next
g. breakpoint
h. looping
i. InputBox
j. Do Until
REFERENCES: 358
368
406
373
377
380
387
387
388
400
97. Objects that can be assigned a default value representing the most likely user input
ANSWER: i
POINTS: 1
99. Items added to this kind of object during design phase are available for selection by the user during program execution
ANSWER: a
POINTS: 1
101. Loop that should be used when code is to be executed a known, exact number of times
ANSWER: f
POINTS: 1
102. Loop in which the body of the loop is executed until the condition becomes true
ANSWER: j
POINTS: 1
105. Identified in the code editor with a bullet to the left of the line number and highlighting of the code on that line
ANSWER: g
POINTS: 1
107. How does a Do loop work? What is the difference between a Do While loop and a Do Until loop? A top-controlled
loop and a bottom-controlled loop?
ANSWER: In a Do loop, the body of the loop is executed while or until a condition is true or false. The Do loop uses
a condition similar to an If…Then decision structure to determine whether it should continue looping. In
this way you can use a Do loop to execute a body of statements an indefinite number of times.
Visual Basic 2015 provides two types of Do loops: the Do While loop and the Do Until loop. Both Do
loops execute statements repeatedly until a specified condition becomes true or false. Each loop
examines a condition to determine whether the condition is true. The Do While loop executes as long as
the condition is true.
The Do Until loop executes until the condition becomes true.
Do loops are either top-controlled or bottom-controlled, depending on whether the condition is tested
before the loop begins or after the body of the loop has executed one time. A top-controlled loop is
tested before the loop is entered; the body of a top-controlled loop might not be executed at all because
the condition being tested might be true before any processing in the loop occurs.
Bottom-controlled loops test the condition at the bottom of the loop, so the body of a bottom-controlled
loop is executed at least once.
POINTS: 1
REFERENCES: 387
TOPICS: Critical Thinking
Case 6-1
Chris is trying to decide which kind of loop is the best loop for him to use to solve a couple of different programming
challenges that he faces.
109. Chris knows the exact number of repetitions he needs the loop to execute. Which of the following is the best choice
for him?
a. top-controlled Do While
b. bottom-controlled Do Until
c. bottom-controlled Do While
d. For…Next
ANSWER: d
POINTS: 1
REFERENCES: 399
TOPICS: Critical Thinking
110. Chris wants to guarantee that the instructions within the loop are executed one time regardless of the status of a
condition. Which of the following should he use?
a. bottom-controlled Do Until
b. top-controlled Do Until
c. For…Next
d. top-controlled Do While
ANSWER: a
POINTS: 1
REFERENCES: 399
TOPICS: Critical Thinking
Case 6-2
Robin thinks that she has a good handle on the use of compound operators but she wants to do a couple of sample
problems just to make certain. In both of the problems below, Robin assumes that intResult = 24.
111. When Robin correctly calculates intResult -= 3, what value does she get?
a. 18
b. 21
c. 72
d. None of the above
ANSWER: b
POINTS: 1
REFERENCES: 378
TOPICS: Critical Thinking
112. When Robin correctly calculates intResult ^= 2, what value does she get?
a. 22
b. 24
c. 48
d. 576
ANSWER: d
POINTS: 1
REFERENCES: 378
TOPICS: Critical Thinking