CS 112a
Fall 2000
Ileana Streinu

Lecture 2


Today: From C to C++

Assigned Reading: Chapter 1 in the textbook (Software engineering).
  1. Administrative: TA hours on Sunday night instead of Monday?
  2. Grading. Criteria for readability. Header: name, class account, hwk number, what the program does. Comments.
  3. Examples in the book, page 4,6. Discussion. Organization of the program: functions before main; function prototypes before main, then main, then function code.
  4. A (brief) review of functions in C and C++.
  5. Header files. Discussion: Examples from textbook.
  6. In-class exercise: modify the dice program 2 (cx1-2.cpp) so to contain the functions after the main function. Use function prototypes. Edit for readability.

Discussion of Hw1