public interface Iterator
{
void init ();
boolean test ();
void inc ();
Object current ();
}
Given an iterator i from some container c,
the contents of c can be printed like this:
for (i.init(); i.test(); i.inc())
System.out.println (i.current());
Devise a wrapper class to encapsulate an enumeration
and provide the functionality of an iterator.