# CSC 160 A First Course in Computer Programming

## Fall, 2002

Here's my summary of what to expect of the final.

#### Kinds of questions

• Here's some Scheme code; what does it do? What would this function do, print, or return if I called it with these parameters?
• Here's an English description of one or more functions; write contracts, examples, and definitions for them. (You've seen several likely examples in homework 8.)
• Here's a real-world problem; design a data type to help you solve it, with data definitions, define-structs (if necessary), contracts for the functions provided by define-struct (if necessary), one or more examples of the data type, and an input template.
• Here's a real-world problem that requires several functions; give contracts and examples (but no definitions) for the functions you would write to solve it.

#### Topics to study

• Basic Scheme syntax (the six or seven rules we've learned)
• Definition by parts vs. definition by choices
• Lists and recursive functions on lists
• Lists of structs and structs containing lists
• Recursive functions on natural numbers
• `set!` to modify existing variables
• `begin` to combine several expressions with side effects
• `local` definitions, and how, when, and why to use them
• `display`, `newline`, and `read` for non-graphical I/O
• Functional abstraction, i.e. functions that take other functions as parameters
• `list` notation: you may use whichever notation you like, but I'll use list notation in writing the exam, and it may save you some writer's cramp.

#### Logistics

The final exam will be in our usual classroom. The 9:25 section will have its exam on Thursday from 10:30-12:30, and the 12:15 section will have its exam on Tuesday from 1:00-3:00. Yes, that's two hours. I'll take the final myself, and if it takes me more than half an hour, it's too long and I'll trim it down. It will be on paper, not on the computer. It will be closed-book and closed-notes. If you have any other questions about the final exam, or your homework, or Scheme, e-mail me.

### Getting Help

My office hours (in Alumnae Hall 113A; if I'm not there, look around the corner in 112) are
• Tuesday/Thursday 11:00-12:00
• Tuesday/Thursday 2:00-5:00
• Wednesday 9:00-11:00
• Other days and times by appointment.

We also have several tutors capable of helping with this course:

MW 12:00-2:00, TTh 1:00-2:00 or by appointment
Faith Barclay
office hours MW 4-6 PM, TTh 11 AM-12 noon, F 11-2, in Alumnae 112
Arvind Budhram
by appointment
Sasha Pogornets
in class (TTh 9:25-10:40 and 12:15-1:30)

### Textbook

The main textbook for this class is How to Design Programs, by Felleisen, Fisler, Flatt, and Krishnamurthi, published by MIT Press. The text of the book is available on-line, but I've also ordered the printed version through the bookstore; you are encouraged, but not required to buy the printed version.
This textbook uses the Scheme programming language. Why Scheme?

### Partners for upcoming assignments

If you need a partner for the next homework, please e-mail me immediately and I'll try to match you up with someone.

### Recipes and Syntax Rules

You'll get through this course a lot more easily if you follow the design recipes! Here are the recipes and syntax rules we've seen so far, and you can also read about the spelling, grammar, vocabulary, and idioms of Scheme.