boolean values the true story ;=p thanks to margaret reid-miller for her original ideas at carnegie...
TRANSCRIPT
Boolean ValuesThe true story
;=P
Thanks to Margaret Reid-Miller for her original ideas at Carnegie Mellon’s CSE
Expressions
Relational Operators
Relational Operators
Relational Operators
Logical Operators
Truth Tables
Logical Operators
Negation of Logical Operator
Logical Operators
Precedence
Logical Operators Exercise 1 Elbow Pairs
Negation of StatementsO Negate the statements below:
O isBroken==true____________________
O phoneAge >=3_____________________
isBroken == false
phoneAge < 3
Logical Operators Exercise 2
Negation of statementsO Negate the statements belowO x==y__________________O y==z__________________
x != y
y != z
Boolean Algebra
de Morgan’s Law Version 1
de Morgan’s Law Version 2
de Morgan’s Law
de Morgan’s Law
What to do?O Statement a= your Practice Its are completeO Statement b = you have an A if (!(a) || !b) { System.out.println(“Let’s get busy NOW”); }else if !(a ||b) { System.out.println(“You Have Work To Do, so get busy.”);} else
System.out.println(“Program the game Pig”);