This chapter looks at how
computer programs make decisions about
numbers and variables
using the
if statement.
This statement
is one of the fundamental building blocks
used in creating large programs.
Chapter Topics:
Two-way Decisions.
Java if statement.
Outline of a two-way decision.
Blocks of statements.
Boolean Expressions.
Relational Operators.
Example Programs.
QUESTION 1:
You are driving in your car and it starts to rain.
The rain falls on your windshield and makes it
hard to see.
Should your windshield wipers be on or off?