Archive for November 2008
Lab 10: Yahtzee, part I
Objectives
Understand how to write methods that accept parameters and return values
Lecture: Two Examples
Download the slides here.
Lecture: Methods
Download the slides.
Simulating Blackjack
The code we went over in class to simulate the game of Blackjack can be found at
Lab 9: Arrays and Iterators
Objectives
- Practice the basics of array access and manipulation
- Use arrays to hold an indeterminate amount of data
- Explain the semantics of the array
collect,select,reject, andinjectiterators - Use iterators and blocks to examine array contents
Use iterators and blocks as an alternative to loops