9781111969752_TB_ch04 - Chapter 13 System Modeling with the UML TRUE\/FALSE 1 Good models promote communicat

9781111969752_TB_ch04 - Chapter 13 System Modeling with the...

This preview shows page 1 - 3 out of 8 pages.

Chapter 4: Making DecisionsTRUE/FALSE 1.Every decision you make in a computer program involves evaluating a Boolean expression. PTS:1REF:122 2.In any Boolean expression, the two values compared can be either variables or constants. PTS:1REF:126 3.Any decision can be made using combinations of just two types of comparisons: equal and not equal. PTS:1REF:127 4.Most programming languages allow you to ask two or more questions in a single comparison. PTS:1REF:134 5.A short-circuit evaluation is where each part of an expression is evaluated only as far as necessary to determine whether the entire expression is true or false. PTS:1REF:135 6.When you need to satisfy two or more criteria to initiate an event in a program, you must make sure that the second decision is made entirely independently of the first decision. PTS:1REF:136 7.Besides ANDand ORoperators, most languages support a NOToperator. PTS:1REF:147 8.Most programming languages limit the number of ANDand ORoperators in an expression. PTS:1REF:154 9.When you combine ANDand ORoperators, the ORoperators take precedence, meaning their Boolean values are evaluated first. PTS:1REF:154 10.You can use parentheses to override the default order of operations. PTS: 1 REF: 156 MULTIPLE CHOICE 1. A selection with an action that is associated with each of two possible outcomes is known as a(n) ____ selection.
PTS:1REF:122 2.The keyword that is NOTincluded in a single-alternative selection is ____. PTS:1REF:122 3.Boolean expressions are named after ____. a.Harold Booleanc.George Booleb.Henry Booled.Gerhardt BooleanANS: CPTS:1REF:122 4.____ operators require two operands. PTS:1REF:126 5.The ____ sign means “greater than.” PTS:1REF:126 6.Usually, ____ variables are not considered to be equal unless they are identical. PTS:1REF:127 7.When you ask multiple questions before an outcome is determined, you create a ____ condition. a.dual-alternativec.single-alternativeb.nestedd.compoundANS: DPTS:1REF:1298.A(n) ____ decision is a decision in which two conditions must be true for an action to take place. PTS: 1 REF: 129

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture