Truth Tables and De Morgan's Rules
Read this chapter, which discusses Boolean variables as used in decision tables. Truth tables are used to collect variables and their values relative to decisions that have to be made within control structures.
5. Computer Purchase Problem
A B C - 0 0 0 - 0 0 1 - 0 1 0 - 0 1 1 - 1 0 0 - 1 0 1 - 1 1 0 - 1 1 1 -
A B C - F F F - F F T - F T F - F T T - T F F - T F T - T T F - T T T -
Computer Purchase Problem
Say that you are shopping for a new computer. You will reject any computer that does not meet your minimum requirements. You require: speed of more than 2000 MHz and more than 512 Meg of memory.
if ( ______(speed > 2000 && memory > 512) )
System.out.println("Reject this computer");
What should go in the blank so that the program fragment is correct?
(Hint: this is NOT a hard question.)