8.7 Summary


8.7 Summary

The repetition structure is an extremely powerful design structure. A group of instructions can be placed in a loop in order to be carried out repeatedly; this group of operations is called the repetition group. The number of times the repetition group is carried out depends on the condition of the loop.

There are three loop constructs: while loop, loop until, and for loop. In the while and for loops, the loop condition is tested first, and then the repetition group is carried out if the condition is true. The loop terminates when the condition is false. In the loop-until construct, the repetition group is carried out first, and then the loop condition is tested. If the loop condition is true, the loop terminates; otherwise, the repetition group is executed again.




Object-Oriented Programming(c) From Problem Solving to Java
Object-Oriented Programming (From Problem Solving to JAVA) (Charles River Media Programming)
ISBN: 1584502878
EAN: 2147483647
Year: 2005
Pages: 184

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net