CS 163 Lecture-Module #13:
Type Parameters

as you know with Java API e.g.  ArrayList<String>,  ArrayList<Product>
you can specify that  class ArrayList  should work on objects
of  class String  or  class Product

to arrange such a situation yourself,
define class accepting type parameter in 'angle brackets':
class C<type_parameter> {
    .
    . // use type_parameter as a type throughout body of |class C|
    .
    }
e.g.  class Stack  in infix_eval


(Copyright © 2009 by Hugh McGuire   — for thoughts about this, see   http://www.cis.gvsu.edu/~mcguire/teaching/copyright_thoughts.html .)