RHS  =>  Allan => Prog2  Last update:  08/21/2003 19:12
WebMaster allanhn@rhs.dk

Collection Assignment

This assignment should be solved in your study group!

The core of the "Java Collections Framework" consists of the interfaces Collection, Map, Iterator, Comparator and Comparable, the class Collections and several subinterfaces and subclasses (some of them abstract). Some of these are aimed at working with Java Beans - you can skip them in this assignment (you can tell by the name if the class/interface is aimed at Java Beans).

Examine these interfaces and classes and draw a class-diagram showing the structure of the Java Collections Framework.

For each of the implementations (classes and abstract classes) discuss why Sun decided to offer actual implemented code instead of just declaring the interface.

For each of the abstract classes examine what methods are declared abstract - try to figure out why.

For each of the interfaces discuss the purpose and use.

You may find the "Trail: Collections by Joshua Bloch" found in the Java Tutorial is useful for inspiration....


Counter: