Abstract Data Types


Outline

  1. Review from lab ??

  2. Generics - Wildcards and limitations
    1. List<String> ls = new ArrayList<String>;
    2. List<Object> lo = ls;  X
    3. This has ramifications for parameter passage.
    4. http://java.sun.com/docs/books/tutorial/extra/generics/wildcards.html
    5. Bounded wildcards to allow only collections of a particular family of objects.
    6. An example: http://java.sun.com/j2se/1.5.0/docs/api/java/util/ArrayList.html
  3. Your turn
  4. Thinking about the storage of collections; how do we build the "data space" for a Sack.
  5. Warehouse analogy.

CS 239 - Spring 2010
Department of Computer Science Nancy Harris Home Page Current Classes Link