Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Boolean Expressions Specific expressions can be evaluated using truth tables 1.

ID: 3759248 • Letter: B

Question

Boolean Expressions

Specific expressions can be evaluated using truth tables

1.  

if (total < MAX+5 && !found)

                                   System.out.println ("Processing…");

total < MAX

found

!found

total < MAX && !found

2.

if (!done && (count > MAX))

                                System.out.println (“Completed.");

3. Assuming done is a boolean variable and value is an int variable create a truth table for:

                  (value > 0) || !done

4. Assuming c1 and c2 are boolean variables, create a truth table for the expression:

(c1 && !c2) || (!c1 && c2)

total < MAX

found

!found

total < MAX && !found

Explanation / Answer

1)

truth table for first will be:

2)

truth table will be

3)

truth table will be

4)

truth table will be

total<max found !found total<max&& !found 0 0 1 0 0 1 0 0 1 0 1 1 1 1 0 0
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote