16

### Reading Assignment and Discussion Topics

Computer Science 111

*for class on Thursday March 30, 2000*

Please read
Section 7.5 (pp. 307-327) of the Schneider and Gersting text, treating Section 7.5.1 very casually and the rest very seriously,
and be prepared to discuss the following:

The text uses the C++ programming language.
In your programming
labs you will be using Java. It turns out that Java and C++ both have a big chunk of the C language as a subset, and we will be using that subset in the next few classes. Your text focuses on that subset too.

Please prepare for this class by doing some programming in
C. Pick any two examples from the following list.
The algorithms get harder as you go down the list, so if you find
this pretty easy try the ones at the end of the list. Use at least
one **for** loop. Unsure about **for** loops? Here's a link to a definition and example grabbed from the U. of Bath.

- Find the smallest element of an array (class 1)
- Find the second-biggest element of an array (midterm exam)
- Euclid's algorithm (problem set 1--C has a lovely operator you
should use:
**m % n**
is the remainder of **m** divided by **n**)
- Count the number of white pawns on a chessboard (class 4)
- Binary search (class 7)
- Bubble sort (problem set 3)