References to Chapter 3 CIST1305

Card Set Information

References to Chapter 3 CIST1305
2013-09-17 13:18:01
Program Design Chapter

Chapter 3 references
Show Answers:

  1. Selection Structure (If-Then-Else structure)
    (sometimes called a decision structure) is one of the basic structures you learned about in Chapter 2. You use a selection structure when a program's logic should take one of two paths based on a decision.  This selection structure is also called an if-then-else structure because of the language used when describing it.
  2. Boolean Expression
    an expression whose value can be only true or false. True/False evaluation is "natural" from a computer's standpoint, because computer circuitry consists of two-state on-off switches, often represented by 1 or 0. Every computer decision yields a true-or-false, yes-or-no-, 1-or-0 result.
  3. George Boole
    was a mathematician who lived from 1815 to 1864. He approached logic more simply than his predecessors did, by expressing logical selections with common algebraic symbols. He is considered the founder of mathematical logic, and Boolean (true/false) expressions are named for him.
  4. Dual-Alternative Selection
    When different actions occur based on the tested Boolean value.
  5. If using a company flow chart, use class for the typical stated name. The use comments // and Declarations which then follows string name and the multiple names that is asking for.
    Then input name, and the requested information.
  6. Stacked Structures
    Means one is "on top of" and completely separate from the other.
  7. Six types of Relational Comparison Operators are available in all modern programming languages
    The term relational comparison operators is somewhat redundant. You also can call these operators relational operators or comparison operators.
  8. = Equivalency operator
    Evaluates as true when operands are equivalent. Many languages use a double equal sign (==) to avoid confusion with the assignment operator.
  9. > Greater-than operator
    Evaluates as true when the left operand is greater than the right operand.
  10. < Less-than operator
    Evaluates as true when the left operand is less than the right operand.
  11. >= Greater-than or equal-to operator
    Evaluates as true when the left operand is greater than or equivalent to the right operand.
  12. <= Less-than or equal-to operator
    Evaluates as true when the left operand is less than or equivalent to the right operand.
  13. <> Not-equal-to operator
    Evaluates as true when its operands are not equivalent. Some languages use an exclamation point followed by an equal sign to indicate not equal to. (!=)
  14. Trivial Expressions (20 < 20 or30 < 40)
    Each will always evaluate to the same result. (False for 20 <20 and true for 30 < 40)
  15. NOT operator
    Used to reverse the meaning of the Boolean expression, but you use it in front of a single-expression. The NOT operator is unary instead of binary--that is, you do not use it between two expressions, but you use it in front of a single expression.
  16. Compound Condition
    When you ask multiple questions before an outcome is determined.
  17. AND Decision
    a decision in which more than one condition must be true for an action to take place.
  18. Nested Decision
    An AND decision  can be constructed  using a nested decision ( also called a nested selection or a nested if). A nested decision contains a decision "inside of" another decision.
  19. Range of Values
    is any series of contiguous values that fall between specified limits.
  20. Range Check
    When you use a range check, you compare a variable to a series of values that mark the limiting  ends of ranges. To perform a range check, make comparisons using either the lowest or highest value in each range of values.
  21. Techniques to use to avoid confusion when mixing AND and OR operators
    • *You can use parentheses for clarity even though they do not change what the order of operations would be without them.
    • * You can use parentheses to override the default order of operations, as in the movie discount example.
    • *You can use nesting if statements instead of combining AND and OR operators in a single expression.