Java Reference
In-Depth Information
5
Objectives
To write programs for executing statements repeatedly using a
while
loop (§5.2).
■
To follow the loop design strategy to develop loops (§§5.2.1-5.2.3).
■
To control a loop with a sentinel value (§5.2.4).
■
To obtain large input from a file using input redirection rather than
typing from the keyboard (§5.2.5).
■
To write loops using
do-while
statements (§5.3).
■
To write loops using
for
statements (§5.4).
■
To discover the similarities and differences of three types of loop
statements (§5.5).
■
To write nested loops (§5.6).
■
To learn the techniques for minimizing numerical errors (§5.7).
■
To learn loops from a variety of examples (
GCD
,
FutureTuition
,
Dec2Hex
) (§5.8).
■
To implement program control with
break
and
continue
(§5.9).
■
To process characters in a string using a loop in a case study for check-
ing palindrome (§5.10).
■
To write a program that displays prime numbers (§5.11).
■
Search WWH ::
Custom Search