|
Can you bake cookies with 9 cups of flour and 1 cup of sugar? A good answer might be:No. You need 4 cups of flour and 2 cups of sugar. Now you have more than enough flour, but not enough sugar, so you can't follow the recipe. | |
Review of Relational OperatorsIn order to bake cookies two things must be true:
The symbol in Java that means "and" is "&&" (ampersand ampersand).
The
Each one of these parts is a relational expression.
A relational expression is a type of boolean expression that
uses a relational operator
to compute a true or false value.
The entire expression between parentheses is also a boolean
expression.
It is OK (and common) for a boolean expression to be composed
of smaller boolean expressions.
This is just like in English where there are "compound sentences"
composed of smaller sentences.
| |
QUESTION 3:Say that you enter 9 for flour and 1 for sugar. What value (true or false) does each of the parts give you? Click Here after you have answered the questionflour >= 4 ________________ sugar >= 2 ________________ |