Test Bank For Java Programming 8th Edition Joyce Farrell
Chapter 05: Making Decisions
True / False
1. You write pseudocode in everyday language, not the syntax used in a programming language.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 246
2. An alternative to using a Boolean expression, such as someVariable == 10, is to store the Boolean expression’s value in a Boolean variable.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 249
3. When you create a block, you must place multiple statements within it.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 255
4. When you use nested if statements, you must pay careful attention to placement of any else clauses.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 261
5. In the switch structure, break is followed by one of the possible values for the test expression and a colon.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 276
6. Computers contain switches that are set to on or off.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 247
7. When writing a statement with the two-line format, you must be sure to type a semicolon at the end of the first line in order to ensure accurate results.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 249
8. Although it is possible to block statements that depend on an if, you cannot likewise block statements that depend on an else.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 257
9. Although not required, it is common procedure to align the keyword if with the keyword else.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 251-252
10. You use the NOT operator, which is written as the exclamation point (!), to negate the result of any Boolean expression.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 281
Multiple Choice
Reviews
There are no reviews yet.