Overloading

  extern void print(int);  
\fbox{print}
extern void print(float);

Generic class -- templates

  template< class T > class list { ... } 
\fbox{ list<T> }
list<int>* alist;

Polymorphism by inheritance

  class shape { ... }; 
\fbox{ shape }
class circle : public shape { ... } shape* s = new circle;

slide: Polymorphic type declarations