Computer Purchase Problem

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   go to next page        

Answer:

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");
else
  System.out.println("Acceptable computer");

Hint: remember the NOT operator.

QUESTION 5:

Fill in the blank so that the program fragment is correct.