Week 4 - Loops
Learning Objectives
Upon finishing this learning module, you should be able to:
- Identify strategies for controlling repetition: counters, sentinels, and flags
- Write programs that use repetition structures to solve problems
Schedule
Day 1
Day 2
Day 3
Day 4
- String Basics
- String Practice worksheet
- Do assignment
Loops
Read Ch 5.1-5.3. This video introduces the key ideas:
Do CPP Lab Basic Loops.
Read Ch 5.4-5.5 and 5.7-5.9 and watch this video:
Do CPP Lab Loops 2.
Read Ch 5.10-5.13, 5.15 and watch this video:
Do CPP Lab Loops CPPLab.
Read the rest of Ch 5.
Work on the assignment while you start preparing for next week by reading about strings below.
String Basics
Read Ch 4.8 and 10.2 (you can stop at 10.2.10). Watch these videos that introduce the basics:
Go look up string on cplusplus.com - use the search box at the top, and do a search for "string". Then click on one of the functions, like "insert" and skim the documentation. You need to start getting used to looking up things - most programmers do that on the web instead of in textbooks, so start practicing!
Do the StringPractice worksheet from the files area of Elearn. Like previous practice sheets, try to predict the output for each statement then check your work against the key.