Transcript Sep 19

COMP 110
Even more even more loops and stuff
Luv Kohli
September 19, 2008
MWF 2-2:50 pm
Sitterson 014
Announcements

Lab 3 due
◦ Hand in your printed out modifyFace() method

Interesting talk on Monday at 4pm, SN011
◦ William Swartout, “Toward the Holodeck: Integrating
Graphics, Artificial Intelligence, Entertainment and
Learning”

Arrr! Today be Talk Like a Pirate Day!
2
Questions?

How is Program 2 coming along?
3
Today in COMP 110

Lab 4 assigned

Help with Program 2 if you need it
4
Silly exercise time!
5
Review: Types of Loops

while
◦ Safest choice
◦ Not always most elegant

do-while
◦ Loop iterates AT LEAST once

for
◦ Similar to while, but often more convenient
syntax
6
How do you decide which loop to use?
Which kind of loop would you use for each
of these scenarios?
1.
“Are we there yet?” loop
2.
Crazy driver loop
3.
Candy loop
7
Monday

Finish up loops

Review strings and loops
8