Programming Logic and Design -
Chapter 4 Questions and Answers
Nested decision - ANSWER-A decision within the if-then or else clause of another
decision; also called a nested if.
NOT operator - ANSWER-A symbol that reverses the meaning of a Boolean
expression.
&& - ANSWER-The conditional and operator in Java C++ and C#
OR decision - ANSWER-A decision that contains two or more conditions; if at least
one condition is met, then the resulting action takes place.
Relational comparison operators - ANSWER-A symbol that expresses Boolean
comparisons. Examples include: =, >, <, >=, <=, and <>.
Range check - ANSWER-The comparison of a variable to a series of values that
mark the limiting ends of ranges.
Short-circuit evaluation - ANSWER-A logical feature in which each part of a larger
expression is evaluated only as far as necessary to determine the final outcome.
trivial expression - ANSWER-An expression that always evaluates to the same
value.
Truth tables - ANSWER-A diagram used in mathematics and logic to help describe
the truth of an entire expression based on the truth of its parts.
unary operator - ANSWER-An operator that uses only one operand.
True - ANSWER-A Boolean expression is one whose value is true or false.
False - ANSWER-The else clause is the part of a decision that executes when a
tested condition in a decision is true.
True - ANSWER-Usually, you can compare only values that are of the same data
type.
True - ANSWER-In any logical comparison expression, the two values compared
can be either variables or constants.
True - ANSWER-When you nest selection structures because the resulting action
requires that two conditions be true, either decision logically can be made first and
the results will be the same.
Chapter 4 Questions and Answers
Nested decision - ANSWER-A decision within the if-then or else clause of another
decision; also called a nested if.
NOT operator - ANSWER-A symbol that reverses the meaning of a Boolean
expression.
&& - ANSWER-The conditional and operator in Java C++ and C#
OR decision - ANSWER-A decision that contains two or more conditions; if at least
one condition is met, then the resulting action takes place.
Relational comparison operators - ANSWER-A symbol that expresses Boolean
comparisons. Examples include: =, >, <, >=, <=, and <>.
Range check - ANSWER-The comparison of a variable to a series of values that
mark the limiting ends of ranges.
Short-circuit evaluation - ANSWER-A logical feature in which each part of a larger
expression is evaluated only as far as necessary to determine the final outcome.
trivial expression - ANSWER-An expression that always evaluates to the same
value.
Truth tables - ANSWER-A diagram used in mathematics and logic to help describe
the truth of an entire expression based on the truth of its parts.
unary operator - ANSWER-An operator that uses only one operand.
True - ANSWER-A Boolean expression is one whose value is true or false.
False - ANSWER-The else clause is the part of a decision that executes when a
tested condition in a decision is true.
True - ANSWER-Usually, you can compare only values that are of the same data
type.
True - ANSWER-In any logical comparison expression, the two values compared
can be either variables or constants.
True - ANSWER-When you nest selection structures because the resulting action
requires that two conditions be true, either decision logically can be made first and
the results will be the same.