Java Reference
In-Depth Information
START
NO
Is it after
5:00 PM
?
Continue working
YES
Read battery meter
Are batteries
less than 80% full
?
NO
YES
Recharge battery
END
Figure 1-2 Flowchart for Recharging a Robot Battery
Noteintheflowchartof Figure1-2 thatthediamondsymbolsrepresent
program decisions. These decisions are based on elementary logic, which
requires that there must be two, but not more than two choices. These
possible answers are labeled YES and NO in the flowchart. Decisions are
the crucial points in the logic. A program that requires no decision is
probably based on such simple logic that a flowchart would be unneces-
sary. For instance, a program that consists of several processing steps
that are always performed in the same sequence does not require a
flowchart.
The logic in computer programs often becomes complicated, or con-
tains subtle points that can be misinterpreted or overlooked. Even simple
 
 
Search WWH ::




Custom Search