Shared Flashcard Set

Details

Java CS170 Chapter. 6 Lecture Questions
Lecture Questions
18
Computer Science
Undergraduate 1
10/15/2011

Additional Computer Science Flashcards

 


 

Cards

Term
George Boole
Definition
Developed the mathematical connection between Algebra and logic that underlies computing
Term
Boolean has two possible values
Definition
true and false
Term
Most boolean values are produced by
Definition
comparing two other values using the relational operators
Term
Six boolean operators:
Definition
<, <=, >, >=, ==, !=
Term
You should not use == or != with
Definition
floating-point
Term
With Strings you should not use
Definition
== or !=

Instead use the equals() method
Term
Like classes and methods, the if has two parts
Definition
The header contains a boolean condition and the body contains code to be executed
Term
Logical operators
Definition
allow us to test several different conditions to produce a single output value
Term
Sequential if statements allow us to
Definition
produce several different outputs, based on interdependent tests
Term
Nested if statements allow us to
Definition
produce several different outputs, based on leveled test criteria
Term
The switch statement allows us to
Definition
produce different output based on a simple integer expression evaluation
Term
The symbol used by Java for AND is
Definition
&& or &

And means both conditions must be true for a true result and if either condition (or both) is false, result is false
Term
The symbol used by Java for inclusive OR is
Definition
|| or |

If any condition is true, the result is true and both conditions must be false for a false result
Term
For && stops when a
Definition
false value is encountered
Term
For || stops when a
Definition
true value is encountered
Term
&&, || are
Definition
the short-circuit versions
Term
&, | are
Definition
the "full evaluation" versions
Term
Multiple Selection Algorithmic Pattern
Definition
is a recipe for solving a particular category of problem. AKA as "ladder-style" if-else-if statements
Supporting users have an ad free experience!