正在加载图片...
Checklist for repetition Control 1. Watch out for the off-by-one error(OBOe) 2. Make sure the loop body contains a statement that will eventually cause the loop to terminate 3. Make sure the loop repeats exactly the correct number of times 4. If you want to execute the loop body N times, then initialize the counter to o and use the test condition counter n or initialize the counter to 1 and use the test condition counter < N C 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 7-11© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 7 - 11 Checklist for Repetition Control 1. Watch out for the off-by-one error (OBOE). 2. Make sure the loop body contains a statement that will eventually cause the loop to terminate. 3. Make sure the loop repeats exactly the correct number of times. 4. If you want to execute the loop body N times, then initialize the counter to 0 and use the test condition counter < N or initialize the counter to 1 and use the test condition counter <= N
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有