Chapter 10 When a multiple-alternative selection structure has many

subject Type Homework Help
subject Pages 4
subject Words 650
subject Authors Diane Zak

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Chapter 10: So Many Paths…So Little Time (Multiple-Alternative Selection Structures)
TRUE/FALSE
1. At times, you may need to create a selection structure that can choose from several alternatives.
2. Another form of the If…Then…Else statement is called If/ElseIf/Else.
3. Using nested If…Then…Else statements is a much more convenient way of coding a
multiple-alternative selection structure than using the Case statement.
4. Variables declared with the Integer, Decimal, and Double data types can store numbers only.
5. The value stored in the Text property is treated as alphanumeric text.
6. As is true in most programming languages, string comparisons in Visual Basic are not case sensitive.
7. In Visual Basic, the uppercase version of a letter is the same as its lowercase counterpart.
8. Each character on the computer keyboard is stored in the computer’s internal memory using a different
Unicode value.
9. Unicode assigns a unique numeric value to each character used in the written languages of the world.
10. The If...Then...Else statement is the only statement you can use to code a multiple-path selection
structure in Visual Basic.
11. The Select Case statement ends with the End Select clause.
12. You can have as many Case clauses as necessary in a Select Case statement.
page-pf2
13. The data type of the expressions in a Select Case statement does not need to be compatible with the
data type of the selectorExpression.
14. If the selectorExpression matches a value in more than one Case clause, only the instructions in the
first match’s Case clause are processed.
15. You can use the To or Is keywords to specify a range of values in a Select Case statement.
MULTIPLE CHOICE
1. Multiple-alternative selection structures or ____ selection structures can choose from several
alternatives.
a.
complex
c.
extended
b.
staged
d.
control
2. The ____ data type can store alphanumeric text, which is text that may contain letters, numbers, or
special characters.
a.
String
c.
Integer
b.
Double
d.
Text
3. The ZIP code 60137 should be stored as a ____ data type.
a.
Integer
c.
String
b.
Double
d.
Text
4. The three-character ID used when naming String variables (and String named constants) is ____.
a.
sti
c.
srg
b.
str
d.
stg
5. The code to create a String variable is ____.
a.
Dim String strCode
c.
Dim strCode As String
b.
Dim strCode String
d.
Dim Codestr As String
6. ____ is the universal coding scheme for characters.
a.
EBCDIC
c.
ASCII
b.
ANSI
d.
Unicode
page-pf3
7. You use the ____ method to convert a string to uppercase.
a.
ConvToUpper
c.
ToUpper
b.
strUpper
d.
ConvUpper
8. You use the ____ method to convert a string to lowercase.
a.
strLower
c.
ConvLower
b.
ConvToLower
d.
ToLower
9. When a multiple-alternative selection structure has many paths from which to choose, it is often
simpler and clearer to code the selection structure using the ____ statement rather than
the If…Then…Else statement.
a.
If
c.
If/ElseIf/Else
b.
Select Case
d.
Select Option
10. The ____ statement can be used to code a multiple-alternative selection structure.
a.
Select
c.
Case
b.
Select Option
d.
Select Case
11. The Select Case statement begins with the keywords Select Case, followed by a(n) ____.
a.
listExpression
c.
expressionList
b.
expressionSelector
d.
selectorExpression
12. To include more than one expression in an expressionList, you separate each expression with a ____.
a.
comma
c.
semicolon
b.
forward slash
d.
period
13. A radio button’s ____ property contains either the Boolean value True or the Boolean value False.
a.
Display
c.
Selected
b.
Default
d.
Checked
14. You can specify a range of values in a Case clause’s ____, such as the values 1 through 8 or values
greater than 10.
a.
statementList
c.
End Case
b.
expressionList
d.
Case
15. Which of the following Case clauses specifies integers greater than 5?
a.
Case Is >= 5
c.
Case Is <> 5
page-pf4
b.
Case Is > 5
d.
Case Is > 5 AndAlso < 15

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.