CS141: Topics for the Week of Oct 10, 2011
Topics & Activities
Mon: Go over Technews assignment.
and course on
Computer Models/Environmental Simulation
: Attracting more Women into Computer Science
Chapter 4 Loops
Nested loops (see lab).
Chapter 5 Methods
What is a method?
Why do we have methods?
Modularization and Reusability
Efficiency - reduce repetition in code, e.g. look at
Anatomy of a Method Declaration:
parameters (type & name for each)
What does it mean "to call" a method.
Example: Rolling dice - see
in class problems
What is the scope of a variable?. Declaring variables local to a block of code.
Follow the instructions:
Lab 6: Nested Loops