CS 112a
Fall 2000
Ileana Streinu

Lecture 7


  1. Quiz 1: write a menu-driven user-interface (as a main program) for testing a function (a test driver). Options:
  2. Recap: struct in C/C++.
  3. In-class lab (nothing to submit): Example of a sorting program using struct and templates in C++. Use the code of the program for selection sort from last time. Modify it:
  4. Preview of homework 4. Use this as a model. It is a program to test a Seelction Sort function, done with templates and passing functions as paramaters. ANother solution is to use the idea discussed in class, of using a variable to tell the program how to compare the data, in each case (and there will be lots of if's in some functions).